Skip to content

Commit 00e2c28

Browse files
committed
put bins on calaos.fr
1 parent ff3434a commit 00e2c28

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

bin/linux/moolticute-cli

-5.98 MB
Binary file not shown.

bin/osx/moolticute-cli

-6.02 MB
Binary file not shown.

bin/windows/moolticute-cli.exe

-6.19 MB
Binary file not shown.

build_upload.sh

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
3+
echo "Build and upload binaries to calaos.fr"
4+
5+
if [ "x$UPLOAD_KEY" == "x" ]; then
6+
echo "Error, UPLOAD_KEY is not set"
7+
exit 1
8+
fi
9+
10+
function upload_file()
11+
{
12+
FNAME=$1
13+
HASH=$(sha256sum $FNAME | cut -d' ' -f1)
14+
INSTALLPATH=$2
15+
16+
echo "Uploading file $FNAME"
17+
18+
curl -X POST \
19+
-H "Content-Type: multipart/form-data" \
20+
-F "upload_key=$UPLOAD_KEY" \
21+
-F "upload_folder=$INSTALLPATH" \
22+
-F "upload_sha256=$HASH" \
23+
-F "upload_file=@$FNAME" \
24+
--progress-bar \
25+
https://calaos.fr/mooltipass/upload -o upload.log
26+
rm -f upload.log
27+
}
28+
29+
BIN="moolticute-cli"
30+
31+
echo ">> Building windows bin"
32+
export GO15VENDOREXPERIMENT=1
33+
export CGO_ENABLED=0
34+
35+
export GOARCH=386
36+
export GOOS=windows
37+
go env
38+
rm -f ${BIN}.exe
39+
go build -i
40+
upload_file ${BIN}.exe "tools/windows"
41+
42+
echo ">> Building linux bin"
43+
export GOARCH=amd64
44+
export GOOS=linux
45+
go env
46+
rm -f $BIN ${BIN}.exe
47+
go build -i
48+
upload_file ${BIN} "tools/linux"
49+
50+
echo ">> Building macos bin"
51+
export GOARCH=amd64
52+
export GOOS=darwin
53+
go env
54+
rm -f $BIN
55+
go build -i
56+
upload_file ${BIN} "tools/macos"
57+

0 commit comments

Comments
 (0)