@@ -57,26 +57,37 @@ open-api:
57
57
swagger-cli bundle documentation/openapi/uhppoted-api.yaml --outfile generated.yaml --type yaml
58
58
59
59
build-all : build test vet lint
60
- mkdir -p dist/$(DIST ) /windows
61
- mkdir -p dist/$(DIST ) /darwin
62
60
mkdir -p dist/$(DIST ) /linux
63
61
mkdir -p dist/$(DIST ) /arm
64
62
mkdir -p dist/$(DIST ) /arm7
65
- env GOOS=linux GOARCH=amd64 GOWORK=off go build -trimpath -o dist/$(DIST ) /linux ./...
66
- env GOOS=linux GOARCH=arm64 GOWORK=off go build -trimpath -o dist/$(DIST ) /arm ./...
67
- env GOOS=linux GOARCH=arm GOARM=7 GOWORK=off go build -trimpath -o dist/$(DIST ) /arm7 ./...
68
- env GOOS=darwin GOARCH=amd64 GOWORK=off go build -trimpath -o dist/$(DIST ) /darwin ./...
69
- env GOOS=windows GOARCH=amd64 GOWORK=off go build -trimpath -o dist/$(DIST ) /windows ./...
63
+ mkdir -p dist/$(DIST ) /darwin-x64
64
+ mkdir -p dist/$(DIST ) /darwin-arm64
65
+ mkdir -p dist/$(DIST ) /windows
66
+ env GOOS=linux GOARCH=amd64 GOWORK=off go build -trimpath -o dist/$(DIST ) /linux ./...
67
+ env GOOS=linux GOARCH=arm64 GOWORK=off go build -trimpath -o dist/$(DIST ) /arm ./...
68
+ env GOOS=linux GOARCH=arm GOARM=7 GOWORK=off go build -trimpath -o dist/$(DIST ) /arm7 ./...
69
+ env GOOS=darwin GOARCH=amd64 GOWORK=off go build -trimpath -o dist/$(DIST ) /darwin-x64 ./...
70
+ env GOOS=darwin GOARCH=arm64 GOWORK=off go build -trimpath -o dist/$(DIST ) /darwin-arm64 ./...
71
+ env GOOS=windows GOARCH=amd64 GOWORK=off go build -trimpath -o dist/$(DIST ) /windows ./...
70
72
71
73
release : update-release build-all
72
74
find . -name " .DS_Store" -delete
73
- tar --directory=dist --exclude=" .DS_Store" -cvzf dist/$(DIST ) .tar.gz $(DIST )
74
- cd dist; zip --recurse-paths $(DIST ) .zip $(DIST )
75
+ tar --directory=dist/$(DIST ) /linux --exclude=" .DS_Store" -cvzf dist/$(DIST ) -linux-x64.tar.gz .
76
+ tar --directory=dist/$(DIST ) /arm --exclude=" .DS_Store" -cvzf dist/$(DIST ) -arm-x64.tar.gz .
77
+ tar --directory=dist/$(DIST ) /arm7 --exclude=" .DS_Store" -cvzf dist/$(DIST ) -arm7.tar.gz .
78
+ tar --directory=dist/$(DIST ) /darwin-x64 --exclude=" .DS_Store" -cvzf dist/$(DIST ) -darwin-x64.tar.gz .
79
+ tar --directory=dist/$(DIST ) /darwin-arm64 --exclude=" .DS_Store" -cvzf dist/$(DIST ) -darwin-arm64.tar.gz .
80
+ cd dist/$(DIST ) /windows && zip --recurse-paths ../../$(DIST ) -windows-x64.zip . -x " .DS_Store"
75
81
76
82
publish : release
77
83
echo " Releasing version $( VERSION) "
78
- rm -f dist/development.tar.gz
79
- gh release create " $( VERSION) " " ./dist/uhppoted-rest_$( VERSION) .tar.gz" " ./dist/uhppoted-rest_$( VERSION) .zip" --draft --prerelease --title " $( VERSION) -beta" --notes-file release-notes.md
84
+ gh release create " $( VERSION) " " ./dist/$( DIST) -arm-x64.tar.gz" \
85
+ " ./dist/$( DIST) -arm7.tar.gz" \
86
+ " ./dist/$( DIST) -darwin-arm64.tar.gz" \
87
+ " ./dist/$( DIST) -darwin-x64.tar.gz" \
88
+ " ./dist/$( DIST) -linux-x64.tar.gz" \
89
+ " ./dist/$( DIST) -windows-x64.zip" \
90
+ --draft --prerelease --title " $( VERSION) -beta" --notes-file release-notes.md
80
91
81
92
debug : build
82
93
$(CMD ) run --console
0 commit comments