Sha256: ddb3c50248d6c18ad6d59d6e61348a31aed306ccb9104e54a6e0518e727041a2
Contents?: true
Size: 1.28 KB
Versions: 8
Compression:
Stored size: 1.28 KB
Contents
#!/usr/bin/env bash DOCKER_IMAGE_NAME="$USER/perfect-scrollbar-rails" LIBRARY_NEW_VERSION=`cat lib/**/*.rb | grep VERSION | awk '{ print $3 }' | tr -d "'"` LIBRARY_UPDATED=`git status --porcelain | grep -v "lib/perfect-scrollbar-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 | 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/perfect-scrollbar-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 "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
8 entries across 8 versions & 1 rubygems