Skip to content

Commit

Permalink
[chore] Adds release script (keycloak#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrparkers authored Dec 17, 2018
1 parent 9ff4fb7 commit a6a5e26
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ custom-user-federation-example/build

# docs
site/

# releases
*.zip
14 changes: 14 additions & 0 deletions scripts/release-targets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"os": "darwin",
"platform": "amd64"
},
{
"os": "linux",
"platform": "amd64"
},
{
"os": "windows",
"platform": "amd64"
}
]
16 changes: 16 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -eu

cd "$(dirname "$0")"

for config in $(cat release-targets.json | jq -rc '.[]'); do
os=$(echo ${config} | jq -r '.os')
platform=$(echo ${config} | jq -r '.platform')

echo "Building for ${os}_${platform}..."

GOOS=${os} GOARCH=${platform} go build -o terraform-provider-keycloak_v${VERSION} ..
zip terraform-provider-keycloak_v${VERSION}_${os}_${platform}.zip terraform-provider-keycloak_v${VERSION} ../LICENSE
rm terraform-provider-keycloak_v${VERSION}
done;

0 comments on commit a6a5e26

Please sign in to comment.