Sha256: 7aa8db7c05f1233dc835662b5535e23944a3ddd0ff0b3e334177be163d976e59
Contents?: true
Size: 1.11 KB
Versions: 7
Compression:
Stored size: 1.11 KB
Contents
#!/usr/bin/env bash DOCKER_IMAGE_NAME="$USER/bootstrap-slider-rails" LIBRARY_NEW_VERSION=`cat lib/**/*.rb | grep VERSION | awk '{ print $3 }' | tr -d "'"` LIBRARY_UPDATED=`git status --porcelain | grep -v "lib/bootstrap-slider-rails/version.rb"` if [[ -n "$LIBRARY_UPDATED" ]]; then echo "Your repository is not clean !" exit 1 fi echo "Ensuring Docker image $DOCKER_IMAGE_NAME exists ..." EXISTING_DOCKER_IMAGE=`docker images | grep "$DOCKER_IMAGE_NAME"` if [[ -z "$EXISTING_DOCKER_IMAGE" ]]; then echo "Building the Docker image ..." docker build -t "$DOCKER_IMAGE_NAME" . fi echo "Updating library code to version $LIBRARY_NEW_VERSION ..." docker run --rm -v `pwd`:/gem/ "$DOCKER_IMAGE_NAME" rake update LIBRARY_UPDATED=`git status --porcelain` if [[ -z "$LIBRARY_UPDATED" ]]; then echo "No update found, stopping release creation." exit 1 fi echo "Committing new version ..." git commit -am "Import version $LIBRARY_NEW_VERSION" echo "Releasing gem ..." docker run --rm -v ~/.gitconfig:/root/.gitconfig \ -v ~/.ssh/:/root/.ssh/ \ -v ~/.gem/:/root/.gem/ \ -v `pwd`:/gem/ "$DOCKER_IMAGE_NAME" rake release
Version data entries
7 entries across 7 versions & 1 rubygems