-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Build scripts refactoring `.github/build-and-upload.sh` to use `build.sh` Related to #32 * Update build.sh Following review comments
- Loading branch information
Showing
2 changed files
with
31 additions
and
21 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 |
---|---|---|
@@ -1,20 +1,12 @@ | ||
#!/bin/bash | ||
|
||
echo "Cloning graphhopper" | ||
git clone https://github.com/graphhopper/graphhopper.git | ||
echo "Building docker image" | ||
docker build . -t israelhikingmap/graphhopper:latest | ||
docker login --username $DOCKERHUB_USER --password $DOCKERHUB_TOKEN | ||
echo "Publishing docker image" | ||
docker push israelhikingmap/graphhopper:latest | ||
echo "Buidling and pushing israelhikingmap/graphhopper:latest" | ||
./build.sh --push | ||
|
||
TAG=`cd graphhopper; git for-each-ref --sort=committerdate refs/tags | tail -n 1 | cut -d "/" -f3` | ||
if docker manifest inspect israelhikingmap/graphhopper:$TAG >/dev/null; then | ||
echo "No need to publish existing version: $TAG"; | ||
TAG=`cd graphhopper; git for-each-ref --sort=committerdate refs/tags | sed -n '$s/.*\///p'` | ||
if docker manifest inspect "israelhikingmap/graphhopper:${TAG}" >/dev/null; then | ||
echo "No need to push existing version: ${TAG}"; | ||
else | ||
(cd graphhopper ; git checkout tags/$TAG) | ||
echo "Building docker image for tag: $TAG" | ||
docker build . -t israelhikingmap/graphhopper:$TAG | ||
echo "Publishing docker image for tag: $TAG" | ||
docker push israelhikingmap/graphhopper:$TAG | ||
echo "Buidling and pushing israelhikingmap/graphhopper:${TAG}" | ||
./build.sh --push "${TAG}" | ||
fi |
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