From 435aaa7bad5b7b8b328c727c0e1945eced23aa89 Mon Sep 17 00:00:00 2001 From: DW at xps Date: Wed, 26 Jun 2024 20:07:46 +1200 Subject: [PATCH] improve happynotes_release: show current version --- bin/release | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/release b/bin/release index 8d2f074..1233873 100755 --- a/bin/release +++ b/bin/release @@ -11,9 +11,13 @@ if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1 fi +script_dir="$(dirname "$(readlink -f "$0")")" +cd $script_dir/.. + # Check if the correct number of arguments is provided if [ "$#" -ne 2 ]; then echo "Usage: $0 " + echo "Current $(rg version: pubspec.yaml)" echo "Example: $0 1.2.3 \"This is a release note\"" exit 1 fi @@ -25,9 +29,6 @@ if ! [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then exit 1 fi -script_dir="$(dirname "$(readlink -f "$0")")" -cd $script_dir/.. - mv .env .env.backup cp .env.production .env