Skip to content

Commit b452606

Browse files
committed
Update release script
1 parent ea1b242 commit b452606

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

scripts/make_release.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
URL=https://github.com/smlu/Urgon.git
4-
BRANCH=develop
4+
BRANCH=master
55

66
SOURCE_DIR="Urgon"
77

@@ -22,12 +22,21 @@ if [ -d $SOURCE_DIR ]
2222
then
2323
pushd .
2424
cd $SOURCE_DIR
25+
git checkout $BRANCH || exit 1
2526
git pull || exit 1
2627
popd
2728
else
2829
git clone $URL -b $BRANCH --recursive $SOURCE_DIR || exit 1
2930
fi
3031

32+
# Checkout to latest tag
33+
pushd .
34+
cd $SOURCE_DIR
35+
git fetch --tags || exit 1
36+
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
37+
git checkout $latestTag || exit 1
38+
git show -s
39+
popd
3140

3241
rm -rf $BUILD_DIR
3342

@@ -54,13 +63,13 @@ cmake --build $UBUNTU64 -- -j8
5463
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
5564

5665
# Compress and print hashes
57-
zip -9jq "$OUTDIR/windows-x86.zip" "$WIN32/bin/cndtool.exe" "$WIN32/bin/gobext.exe" "$WIN32/bin/matool.exe"
66+
zip -9Xjq "$OUTDIR/windows-x86.zip" "$WIN32/bin/cndtool.exe" "$WIN32/bin/gobext.exe" "$WIN32/bin/matool.exe"
5867
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
5968

60-
zip -9jq "$OUTDIR/windows-x86-64.zip" "$WIN64/bin/cndtool.exe" "$WIN64/bin/gobext.exe" "$WIN64/bin/matool.exe"
69+
zip -9Xjq "$OUTDIR/windows-x86-64.zip" "$WIN64/bin/cndtool.exe" "$WIN64/bin/gobext.exe" "$WIN64/bin/matool.exe"
6170
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
6271

63-
tar -czf "$OUTDIR/linux-x86-64.tar.gz" -C "$UBUNTU64/bin/" cndtool gobext matool > /dev/null
72+
tar -czf "$OUTDIR/linux-x86-64.tar.gz" -C "$UBUNTU64/bin/" cndtool gobext matool | gzip -n > /dev/null
6473
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
6574

6675
echo "sha256 windows-x86.zip: $(sha256sum $OUTDIR/windows-x86.zip | awk '{ print $1 }')"

0 commit comments

Comments
 (0)