-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ build: | |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/k8s-linux-amd64/k8s ./cmd/k8s | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/k8s-darwin-amd64/k8s ./cmd/k8s | ||
deploy: | ||
prerelease: | ||
steps: | ||
- script: | ||
name: "Pull secrets" | ||
|
@@ -31,21 +31,34 @@ deploy: | |
name: "Push release" | ||
code: | | ||
mkdir -p dist | ||
if [[ "$WERCKER_DEPLOYTARGET_NAME" == "prerelease" ]]; then | ||
VERSION="$(v5n store bump k8s rc)" | ||
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION" | ||
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION" | ||
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz . | ||
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz . | ||
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace --prerelease "v$VERSION" ./dist | ||
else | ||
VERSION="$(v5n store bump k8s final+patch)" | ||
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION" | ||
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION" | ||
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz . | ||
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz . | ||
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace "v$VERSION" ./dist | ||
fi | ||
VERSION="$(v5n store bump k8s rc)" | ||
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION" | ||
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION" | ||
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz . | ||
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz . | ||
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace --prerelease "v$VERSION" ./dist | ||
- mbrevda/[email protected]: | ||
token: $WRK_TOKEN | ||
application_id: $WRK_APP | ||
message: Triggered from k8s | ||
|
||
stable: | ||
steps: | ||
- script: | ||
name: "Pull secrets" | ||
code: | | ||
curl -# https://gist.githubusercontent.com/fd/354eed3ebf924565741f0df980d11741/raw/sec.pem | sec dec | tar -C $HOME -x | ||
eval "$(install-creds)" | ||
- script: | ||
name: "Push release" | ||
code: | | ||
mkdir -p dist | ||
VERSION="$(v5n store bump k8s final+patch)" | ||
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION" | ||
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION" | ||
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz . | ||
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz . | ||
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace "v$VERSION" ./dist | ||
- mbrevda/[email protected]: | ||
token: $WRK_TOKEN | ||
application_id: $WRK_APP | ||
|