Skip to content

Commit 358e4b3

Browse files
committed
build scripts
1 parent 36220dd commit 358e4b3

File tree

4 files changed

+55
-4
lines changed

4 files changed

+55
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea/
2-
fyne-cross/
2+
fyne-cross/
3+
release/

scripts/build.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/env bash
2+
export VERSION=0.1.1
3+
4+
if [ ! -d "scripts" ]; then
5+
echo "run from root dir"
6+
exit
7+
fi
8+
9+
echo cleaning
10+
rm -rf release/*
11+
mkdir -p release
12+
13+
# build windows
14+
sh ./scripts/buildWindows.sh
15+
code=$?
16+
if [ $code -ne 0 ]
17+
then
18+
echo windows build failed
19+
exit $code
20+
fi
21+
22+
# build linux
23+
sh ./scripts/buildLinux.sh
24+
code=$?
25+
if [ $code -ne 0 ]
26+
then
27+
echo linux build failed
28+
exit $code
29+
fi
30+
31+
echo moving files
32+
for f in ./fyne-cross/dist/*; do
33+
file=$(cd "$f" && ls)
34+
cp "$f/$file" "release/$(basename "$f")-$file"
35+
done
36+
37+

scripts/buildLinux.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
if [ -z "$VERSION" ]
4+
then
5+
echo "VERSION must be set"
6+
exit 1
7+
fi
8+
9+
fyne-cross linux -app-id com.zivoy.beatlist -app-version $VERSION -arch=* ./cmd/gui

scripts/buildWindows.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env bash
2-
VERSION=0.1.1
32

4-
# working dir should be base folder
5-
fyne-cross windows -app-id com.zivoy.beatlist -app-version $VERSION ./cmd/gui
3+
if [ -z "$VERSION" ]
4+
then
5+
echo "VERSION must be set"
6+
exit 1
7+
fi
8+
9+
fyne-cross windows -app-id com.zivoy.beatlist -app-version $VERSION -arch=* ./cmd/gui

0 commit comments

Comments
 (0)