forked from tomasy/zigbee-conbee-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·32 lines (24 loc) · 743 Bytes
/
package.sh
File metadata and controls
executable file
·32 lines (24 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
version=$(grep version package.json | cut -d: -f2 | cut -d\" -f2)
# Clean up from previous releases
rm -rf *.tgz package
rm -f SHA256SUMS
#rm -rf lib
# Prep new package
#mkdir lib
mkdir package
# Pull down Python dependencies
#pip3 install -r requirements.txt -t lib --no-binary pyHS100 --prefix ""
# Put package together
#cp -r lib pkg LICENSE package.json *.py package/
cp -r pkg LICENSE README.md package.json *.py package/
find package -type f -name '*.pyc' -delete
find package -type d -empty -delete
# Generate checksums
cd package
sha256sum *.py pkg/*.py LICENSE > SHA256SUMS
#find lib -type f -exec sha256sum {} \; >> SHA256SUMS
cd -
# Make the tarball
tar czf "zigbee-conbee-adapter-${version}.tgz" package