Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
Added release script
Browse files Browse the repository at this point in the history
  • Loading branch information
stianst committed Mar 5, 2019
1 parent f06cec4 commit d8a3869
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ build: golang
release: clean golang deps
@mkdir -p release
$(foreach GOOS, $(PLATFORMS),\
$(foreach GOARCH, $(ARCHITECTURES), $(shell [ $(GOOS) = "windows" ] && EXT=".exe"; env GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 \
$(foreach GOARCH, $(ARCHITECTURES), $(shell [ $(GOOS) = "windows" ] && EXT=".exe"; env GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0; \
go build -a -tags netgo -ldflags "-w ${LFLAGS}" -o bin/${NAME}$$EXT; \
tar -czvf release/${NAME}-$(GOOS)-$(GOARCH).tar.gz -C bin/ ${NAME}$$EXT >/dev/null; \
sha1sum release/${NAME}-$(GOOS)-$(GOARCH).tar.gz | cut -d " " -f1 > release/${NAME}-$(GOOS)-$(GOARCH).tar.gz.sha1 )))
Expand Down
30 changes: 30 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash -e

DIR="$PWD"
VERSION=`./get-version.sh`
echo "Version: $VERSION"

TMP=`mktemp -d`
export GOPATH=$TMP/go

mkdir -p $GOPATH/src/github.com/keycloak
ln -s $DIR $GOPATH/src/github.com/keycloak/keycloak-gatekeeper
cd $GOPATH/src/github.com/keycloak/keycloak-gatekeeper

echo "------------------------------------------------------------------------------------------------------------"
echo "Building:"
echo ""

make release --trace


echo "------------------------------------------------------------------------------------------------------------"
echo "Upload to jboss.org:"
echo ""

rsync -rv --protocol=28 $RELDIR/keycloak-gatekeeper/release/* [email protected]:/downloads_htdocs/keycloak/$VERSION/gatekeeper/


echo "------------------------------------------------------------------------------------------------------------"
echo "Done"
echo "------------------------------------------------------------------------------------------------------------"

0 comments on commit d8a3869

Please sign in to comment.