Skip to content

Commit 7208eb2

Browse files
committed
Fix version in binary
1 parent b7bfe27 commit 7208eb2

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

build.sla

+16-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ clean () {
3333
rm -rf *.zip
3434
rm -rf *.deb
3535
rm -rf rel_deb
36+
rm -rf rel_bin
3637
rm -rf scriptform-*
3738
rm -rf doc/manual.html
3839
rm -rf doc/MANUAL.html
@@ -96,7 +97,7 @@ release_src () {
9697
cp doc/MANUAL.html "$PROG-$REL_VERSION/MANUAL.html"
9798

9899
# Bump version numbers
99-
find "$PROG-$REL_VERSION/" -type f -print0 | xargs -0 sed -i "s/%%VERSION%%/$REL_VERSION/g"
100+
find "$PROG-$REL_VERSION/" -type f -print0 | xargs -0 sed -i "s/%%VERSION%%/$REL_VERSION/g"
100101

101102
# Create archives
102103
zip -q -r "$PROG-$REL_VERSION.zip" "$PROG-$REL_VERSION"
@@ -129,7 +130,7 @@ release_deb () {
129130
cp -ar contrib/debian/DEBIAN "rel_deb/"
130131

131132
# Bump version numbers
132-
find rel_deb/ -type f -print0 | xargs -0 sed -i "s/%%VERSION%%/$REL_VERSION/g"
133+
find rel_deb/ -type f -print0 | xargs -0 sed -i "s/%%VERSION%%/$REL_VERSION/g"
133134

134135
# Create debian pacakge
135136
fakeroot dpkg-deb --build rel_deb > /dev/null
@@ -169,12 +170,24 @@ release_bin () {
169170
_release_check "$*"
170171

171172
rm -rf dist/scriptform/
172-
pyinstaller --strip --onefile src/scriptform.py
173+
174+
# Create copy and bump version numbers
175+
cp -ar src/ rel_bin/
176+
find rel_bin/ -type f -print0 | xargs -0 sed -i "s/%%VERSION%%/$REL_VERSION/g"
177+
178+
# Generate binary
179+
pyinstaller --strip --onefile rel_bin/scriptform.py
180+
181+
# Generate tarball
173182
mv dist $PROG-$REL_VERSION-bin64
183+
cp contrib/scriptform.service $PROG-$REL_VERSION-bin64
174184
tar -czf $PROG-$REL_VERSION-bin64.tar.gz $PROG-$REL_VERSION-bin64
185+
186+
# Cleanup
175187
rm -rf $PROG-$REL_VERSION-bin64
176188
rm -rf $PROG.spec
177189
rm -rf build
190+
rm -rf rel_bin
178191
}
179192

180193
release () {

0 commit comments

Comments
 (0)