fix cross compilation and bintray uploading

This commit is contained in:
Tomas Kral
2018-01-31 17:36:49 +01:00
parent 0fcad79944
commit 104f2c0028
2 changed files with 11 additions and 7 deletions

View File

@@ -45,4 +45,4 @@ test-coverage:
# compile for multiple platforms
.PHONY: cross
cross:
gox -osarch="darwin/amd64 linux/amd64 linux/arm windows/amd64" -output="bin/kedge-{{.OS}}-{{.Arch}}" $(BUILD_FLAGS)
gox -osarch="darwin/amd64 linux/amd64 linux/arm windows/amd64" -output="bin/{{.OS}}-{{.Arch}}/ocdev" $(BUILD_FLAGS)

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
DATE=`date --iso-8601=date`
TIME=`date --iso-8601=seconds`
@@ -17,9 +17,9 @@ commit_id: ${commit_id}
files:
EOF
for f in $(ls -1 ./bin/* | grep -v info.txt); do
for f in $(ls -1 ./bin/*/* | grep -v info.txt); do
sha256sum=$(sha256sum $f | cut -d ' ' -f 1);
name=$(basename $f)
name=$(echo $f | sed "s/^\.\/bin\///")
updated_on=$(stat -c %y $f)
cat >> "./bin/info.txt" <<EOF
- name: ${name}"
@@ -64,11 +64,15 @@ cat > "./.bintray.json" <<EOF
"files":
[
{"includePattern": "bin/(.*)",
"uploadPattern": "./latest/\$1",
{"includePattern": "bin\/([^\/]+)\/(.*)",
"uploadPattern": "./latest/\$1/\$2",
"matrixParams": {"override": 1 }
},
{"includePattern": "bin/info.txt",
"uploadPattern": "./latest/info.txt",
"matrixParams": {"override": 1 }
}
],
"publish": true
}
EOF
EOF