Skip to content

Commit

Permalink
Make release.sh work with ref names with slashes. (#2722)
Browse files Browse the repository at this point in the history
* Make release.sh work with branch names with slashes.

* Typo.
  • Loading branch information
danielmai authored and manishrjain committed Nov 9, 2018
1 parent ff1e5c3 commit b5ac4d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contrib/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ rm -Rf $GOPATH
mkdir $GOPATH

TAG=$1
# The Docker tag should not contain a slash e.g. feature/issue1234
# The initial slash is taken from the repository name dgraph/dgraph:tag
DTAG=$(echo "$TAG" | tr '/' '-')


# DO NOT change the /tmp/build directory, because Dockerfile also picks up binaries from there.
TMP="/tmp/build"
Expand Down Expand Up @@ -139,7 +143,7 @@ createSum linux
# Create Docker image.
cp $basedir/dgraph/contrib/Dockerfile $TMP
pushd $TMP
docker build -t dgraph/dgraph:$TAG .
docker build -t dgraph/dgraph:$DTAG .
popd
rm $TMP/Dockerfile

Expand All @@ -158,5 +162,5 @@ createTar darwin
createTar linux

echo "Release $TAG is ready."
docker run -it dgraph/dgraph:$TAG dgraph
docker run -it dgraph/dgraph:$DTAG dgraph
ls -alh $TMP

0 comments on commit b5ac4d7

Please sign in to comment.