Sha256: c92f9ce7661383130bb2a63964431db4576c3e337e3d0833f5b84554b0963192
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
#!/usr/bin/env bash DOCKER_IMAGE_NAME="$USER/switchery-rails" LIBRARY_NEW_VERSION=`cat lib/switchery/rails/version.rb | grep VERSION | awk '{ print $3 }' | tr -d "'"` LIBRARY_UPDATED=`git status --porcelain | grep -v "lib/switchery/rails/version.rb"` if [[ -n "$LIBRARY_UPDATED" ]]; then echo "Your repository is not clean !" exit 1 fi echo "Building the Docker image ..." docker build -t "$DOCKER_IMAGE_NAME" . 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 | grep -v make_new_release.sh` if [[ -z "$LIBRARY_UPDATED" ]]; then echo "No update found, stopping release creation." exit 1 elif [[ "$LIBRARY_UPDATED" == " M lib/switchery/rails/version.rb" ]]; then echo "None of the JS or CSS files have been updated." exit 1 fi echo "Committing new version ..." git commit -am "Bumped version $LIBRARY_NEW_VERSION" git tag -a "v$LIBRARY_NEW_VERSION" -m "v$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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
switchery-rails-0.8.2.0 | make_new_release.sh |