-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease-code.sh
More file actions
executable file
·33 lines (28 loc) · 924 Bytes
/
release-code.sh
File metadata and controls
executable file
·33 lines (28 loc) · 924 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
33
#!/bin/bash
CFILE=wapp_markdown_server
timestamp=$(date +%s)
VERSION=$(echo `cat VERSION`.$timestamp)
git add .
git commit -am "`date` update"
git tag $VERSION
git push
if [ "$?" != "0" ]; then
echo "====================================================="
echo "ERROR"
echo
exit 1
fi
echo "[!] " gh release create $VERSION -t $VERSION -n '""' --target main
gh release create $VERSION -t $VERSION -n "" --target main
if [ "$1" == "pyinst" -o "$1" == "all" ]; then
./build.sh pyinst
cp dist/__main__ ../"${CFILE}.bin"
gh release upload $VERSION ../"${CFILE}.bin" --clobber
elif [ "$1" == "pyinst_docker" -o "$1" == "all" ]; then
./build.sh pyinst_docker
cp dist/__main__ ../"${CFILE}__all.bin"
gh release upload $VERSION ../"${CFILE}.bin" --clobber
elif [ "$1" == "zipapp" -o "$1" == "all" ]; then
./build.sh zipapp
gh release upload $VERSION ../"${CFILE}.pyz" --clobber
fi