Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
fix post-push hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Feb 9, 2019
1 parent 1a3dc83 commit 3524126
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 12 additions & 1 deletion hooks/post_push
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
#!/bin/bash
set -e

echo "Working dir and contents I see are:"
echo `pwd`
VERSION=`grep -e "\d\.\d\.\d" -o Dockerfile`
echo `ls`

## Not all bash commands are available. notably grep -o -e options fail!!
VERSION=`cat Dockerfile | head -n1 | sed 's/.*\([0-9].[0-9].[0-9]\)/\1/'`
echo "Version being built is:"
echo $VERSION

echo "tagging $IMAGE_NAME as $DOCKER_REPO:$VERSION..."
docker tag $IMAGE_NAME $DOCKER_REPO:$VERSION

echo "pushing $DOCKER_REPO:$VERSION to hub..."
docker push $DOCKER_REPO:$VERSION


Expand Down
13 changes: 12 additions & 1 deletion shiny-verse/hooks/post_push
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
#!/bin/bash
set -e

echo "Working dir and contents I see are:"
echo `pwd`
VERSION=`grep -e "\d\.\d\.\d" -o Dockerfile`
echo `ls`

## Not all bash commands are available. notably grep -o -e options fail!!
VERSION=`cat Dockerfile | head -n1 | sed 's/.*\([0-9].[0-9].[0-9]\)/\1/'`
echo "Version being built is:"
echo $VERSION

echo "tagging $IMAGE_NAME as $DOCKER_REPO:$VERSION..."
docker tag $IMAGE_NAME $DOCKER_REPO:$VERSION

echo "pushing $DOCKER_REPO:$VERSION to hub..."
docker push $DOCKER_REPO:$VERSION


Expand Down

0 comments on commit 3524126

Please sign in to comment.