File tree Expand file tree Collapse file tree 5 files changed +8
-48
lines changed
Expand file tree Collapse file tree 5 files changed +8
-48
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ tasks:
109109 desc : Packages MassaStation using fyne
110110 platforms : [linux, darwin]
111111 cmds :
112- - cmd : fyne package -src ./cmd /massastation -icon ../../ int/systray/embedded/logo.png -name MassaStation --app-id net.massalabs.massastation {{if .OS}}--os {{.OS}}{{end}}
112+ - cmd : fyne package -name MassaStation -exe build/massastation /massastation -icon ./ int/systray/embedded/logo.png --app-id net.massalabs.massastation {{if .OS}}--os {{.OS}}{{end}}
113113
114114 generate-dirs :
115115 desc : Generates required directories for MassaStation
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,28 +17,6 @@ fatal() {
1717 exit 1
1818}
1919
20- # Install dependencies required to build the MassaStation binary.
21- install_massastation_build_dependencies () {
22- sudo apt-get update || fatal " failed to update apt"
23- sudo apt-get install -y --fix-missing libgl1-mesa-dev xorg-dev || fatal " failed to install libgl1-mesa-dev xorg-dev"
24- go install fyne.io/tools/cmd/fyne@v1.7.0 || fatal " failed to install fyne.io/tools/cmd/fyne@v1.7.0"
25- go install github.com/go-swagger/go-swagger/cmd/swagger@latest || fatal " failed to install github.com/go-swagger/go-swagger/cmd/swagger@latest"
26- go install golang.org/x/tools/cmd/stringer@latest || fatal " failed to install golang.org/x/tools/cmd/stringer@latest"
27- }
28-
29- # Build MassaStation from source.
30- build_massastation () {
31- install_massastation_build_dependencies
32-
33- # Ensure go install binaries are in PATH
34- export PATH=" $PATH :$( go env GOPATH) /bin"
35-
36- go generate ../... || fatal " go generate failed for $MASSASTATION_BINARY_NAME "
37- export GOARCH=$ARCH
38- export CGO_ENABLED=1
39- fyne package -src ../cmd/massastation -icon ../../int/systray/embedded/logo.png -name MassaStation --app-id com.massalabs.massastation || fatal " fyne package failed for $MASSASTATION_BINARY_NAME "
40- }
41-
4220# Delete the build directory if it exists.
4321clean () {
4422 if [ -d $BUILD_DIR ]; then
@@ -60,7 +38,7 @@ main() {
6038
6139 install_dependencies
6240
63- test -f $MASSASTATION_ARCHIVE_NAME || build_massastation
41+ test -f $MASSASTATION_ARCHIVE_NAME || fatal " $MASSASTATION_ARCHIVE_NAME not found "
6442
6543 mkdir -p $TMP_DIR || fatal " failed to create $TMP_DIR "
6644 tar -xf $MASSASTATION_ARCHIVE_NAME -C $TMP_DIR || fatal " failed to extract $MASSASTATION_ARCHIVE_NAME to $TMP_DIR "
Original file line number Diff line number Diff line change @@ -35,24 +35,6 @@ fatal() {
3535 exit 1
3636}
3737
38- # Install dependencies required to build the MassaStation binary.
39- install_massastation_build_dependencies () {
40- go install fyne.io/tools/cmd/fyne@v1.7.0
41- go install github.com/go-swagger/go-swagger/cmd/swagger@latest
42- go install golang.org/x/tools/cmd/stringer@latest
43- }
44-
45- # Build MassaStation from source.
46- build_massastation () {
47- install_massastation_build_dependencies
48-
49- go generate ../... || fatal " go generate failed for $MASSASTATION_APPLICATION_NAME "
50- export GOARCH=$ARCH
51- export CGO_ENABLED=1
52- fyne package -src ../cmd/massastation -icon ../../int/systray/embedded/logo.png -name MassaStation --app-id com.massalabs.massastation || fatal " fyne package failed for $MASSASTATION_APPLICATION_NAME "
53- chmod +x $MASSASTATION_APPLICATION_NAME || fatal " failed to chmod $MASSASTATION_APPLICATION_NAME "
54- }
55-
5638# Build the package using pkgbuild.
5739package () {
5840 # sign the application if we have a developer id
@@ -73,8 +55,8 @@ package() {
7355}
7456
7557main () {
76- # build massastation only if the .app is not present
77- test -d $MASSASTATION_APPLICATION_NAME || build_massastation
58+
59+ test -d $MASSASTATION_APPLICATION_NAME || fatal " $MASSASTATION_APPLICATION_NAME not found "
7860
7961 if [ ! -d macos/resources ]; then
8062 mkdir macos/resources || fatal " failed to create resources directory"
Original file line number Diff line number Diff line change 1+ package resource
2+
3+ // API swagger
4+ //go:generate sh -c "cd .. && swagger generate server --quiet --target api/swagger/server --name massastation --spec api/swagger/server/restapi/resource/swagger.yml --exclude-main"
You can’t perform that action at this time.
0 commit comments