From 00d410fd7d6ef79210797e7e13fa34f8c7e09e48 Mon Sep 17 00:00:00 2001 From: iker barriocanal <32816711+iker-barriocanal@users.noreply.github.com> Date: Wed, 7 Jul 2021 14:03:47 +0200 Subject: [PATCH] feat(release): Set plugin version on pre-release (#142) --- scripts/bump-version.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/bump-version.sh diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh new file mode 100755 index 000000000..804534f0d --- /dev/null +++ b/scripts/bump-version.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -eux + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $SCRIPT_DIR/.. + +OLD_VERSION="${1}" +NEW_VERSION="${2}" + +GRADLE_FILEPATH="plugin-build/gradle.properties" + +# Replace `version` with the given version +VERSION_NAME_PATTERN="version" +sed -i "" -e "s/$VERSION_NAME_PATTERN = .*$/$VERSION_NAME_PATTERN = $NEW_VERSION/g" $GRADLE_FILEPATH