Skip to content

Commit

Permalink
versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
fopina committed Aug 17, 2017
1 parent e7979b0 commit c963e21
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
8 changes: 5 additions & 3 deletions hooks/build
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash

echo "Build hook running"
VERSION=$(cat VERSION)

echo "Build hook running for version $VERSION"

# once dockerhub supports ARG before FROM (upgrade to 1.9)
# docker build --build-arg CODE_VERSION=3.6 -t $DOCKER_REPO:3.6-$CACHE_TAG .
# docker build --build-arg CODE_VERSION=3.5 -t $DOCKER_REPO:3.5-$CACHE_TAG .

echo "Building 3.6..."
docker build -t $DOCKER_REPO:3.6-$CACHE_TAG -f Dockerfile .
docker build -t $DOCKER_REPO:3.6-$VERSION -f Dockerfile .
echo "Building 3.5..."
docker build -t $DOCKER_REPO:3.5-$CACHE_TAG -f Dockerfile.3.5 .
docker build -t $DOCKER_REPO:3.5-$VERSION -f Dockerfile.3.5 .
11 changes: 6 additions & 5 deletions hooks/push
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/bash

VERSION=$(cat VERSION)
echo "Tagging and pushing..."

docker tag $DOCKER_REPO:3.6-$CACHE_TAG $DOCKER_REPO:latest
docker tag $DOCKER_REPO:3.6-$CACHE_TAG $DOCKER_REPO:3.6
docker tag $DOCKER_REPO:3.5-$CACHE_TAG $DOCKER_REPO:3.5
docker tag $DOCKER_REPO:3.6-$VERSION $DOCKER_REPO:latest
docker tag $DOCKER_REPO:3.6-$VERSION $DOCKER_REPO:3.6
docker tag $DOCKER_REPO:3.5-$VERSION $DOCKER_REPO:3.5

docker push $DOCKER_REPO
docker push $DOCKER_REPO:3.6-$CACHE_TAG
docker push $DOCKER_REPO:3.6-$VERSION
docker push $DOCKER_REPO:3.6
docker push $DOCKER_REPO:3.5-$CACHE_TAG
docker push $DOCKER_REPO:3.5-$VERSION
docker push $DOCKER_REPO:3.5

0 comments on commit c963e21

Please sign in to comment.