forked from spacecloud-io/space-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
22 lines (19 loc) · 1.17 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
mkdir linux && mkdir windows && mkdir darwin
GOOS=darwin GOARCH=amd64 go build -ldflags '-s -w -extldflags "-static"' .
zip space-cloud.zip space-cloud
mv ./space-cloud.zip ./darwin/
rm space-cloud
GOOS=windows GOARCH=amd64 go build -ldflags '-s -w -extldflags "-static"' .
zip space-cloud.zip space-cloud.exe
mv ./space-cloud.zip ./windows/
rm space-cloud.exe
GOOS=linux GOARCH=amd64 go build -ldflags '-s -w -extldflags "-static"' .
zip space-cloud.zip space-cloud
mv ./space-cloud.zip ./linux/
rm space-cloud
# echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# docker push spaceuptech/space-cloud:latest
curl -H "Authorization: Bearer $JWT_TOKEN" -F 'file=@./darwin/space-cloud.zip' -F 'fileType=file' -F 'makeAll=false' -F 'path=/darwin' https://spaceuptech.com/v1/api/downloads/files
curl -H "Authorization: Bearer $JWT_TOKEN" -F 'file=@./windows/space-cloud.zip' -F 'fileType=file' -F 'makeAll=false' -F 'path=/windows' https://spaceuptech.com/v1/api/downloads/files
curl -H "Authorization: Bearer $JWT_TOKEN" -F 'file=@./linux/space-cloud.zip' -F 'fileType=file' -F 'makeAll=false' -F 'path=/linux' https://spaceuptech.com/v1/api/downloads/files