Skip to content

Commit

Permalink
Add final release for multi platform support
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriano Santos committed Nov 26, 2019
1 parent 7dcbad9 commit b78b368
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/cloudstate-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ fi
if [[ "$OSTYPE" == "linux-gnu" ]]; then
curl -vvv -H 'Cache-Control: no-cache' -s https://api.github.com/repos/sleipnir/cloudstate-cli/releases/latest \
| grep browser_download_url \
| grep unknown-linux-gnu.tar.gz \
| grep linux.tar.gz \
| cut -d '"' -f 4 \
| wget -qi -

elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
curl -vvv -H 'Cache-Control: no-cache' -s https://api.github.com/repos/sleipnir/cloudstate-cli/releases/latest \
| grep browser_download_url \
| grep apple-darwin.tar.gz \
| grep osx.tar.gz \
| cut -d '"' -f 4 \
| wget -qi -

Expand Down
2 changes: 1 addition & 1 deletion cloudstate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cloudstate"
version = "0.2.5"
version = "0.3.53"
description = "CloudState CLI"
keywords = [
"serverless",
Expand Down
8 changes: 8 additions & 0 deletions cloudstate/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@ set -euo pipefail

case `uname -s` in
Linux)
sudo apt-get update && sudo apt-get install -y upx-ucl
echo "Building static binaries using ekidd/rust-musl-builder"
docker build -t build-"$1"-image .
docker run -it --name build-"$1" build-"$1"-image
docker cp build-"$1":/home/rust/src/target/x86_64-unknown-linux-musl/release/cloudstate cloudstate
docker rm build-"$1"
docker rmi build-"$1"-image

echo "Compress binary file"
/usr/bin/upx --brute /home/rust/src/target/x86_64-unknown-linux-musl/release/cloudstate

echo "Validate binary file"
file /home/rust/src/target/x86_64-unknown-linux-musl/release/cloudstate

echo "Generate relase file"
tar vczf "$1"-"$2".tar.gz cloudstate
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion cloudstate/src/cli.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cloudstate
version: "0.2.5"
version: "0.3.53"
author: Adriano Santos <sleipnir@bsd.com.br>
about: CloudState CLI
args:
Expand Down

0 comments on commit b78b368

Please sign in to comment.