#!/usr/bin/env bash VERSION="${1}" [ -z "${VERSION}" ] && echo missing VERSION && exit 1 echo updating gem version to "${VERSION}" &&\ sed -i 's/fluent-plugin-cwm-http (0.0.0)/fluent-plugin-cwm-http ('"${VERSION}"')/' Gemfile.lock &&\ sed -i "s/= '0.0.0'/= '${VERSION}'/" fluent-plugin-cwm-http.gemspec