From 2ba7fc20f8c4b80c1c8752297727c4d60c1b84fb Mon Sep 17 00:00:00 2001 From: Vladislav Trotsenko Date: Wed, 4 Jan 2023 15:29:23 +0100 Subject: [PATCH 1/2] Technical/Refactor sh scripts (#149) * Updated download script * Updated CI scripts (tag/release) --- .circleci/scripts/release.sh | 2 +- .circleci/scripts/tag.sh | 4 ++-- script/download.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/scripts/release.sh b/.circleci/scripts/release.sh index ec72c05..ffc004a 100755 --- a/.circleci/scripts/release.sh +++ b/.circleci/scripts/release.sh @@ -5,7 +5,7 @@ github_namespace=$1 github_repository=$2 get_latest_tag() { - git tag -l | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+" | cut -d"-" -f 1 | sort | tail -n 1 + git tag --sort=v:refname | grep -E "v[0-9]+\.[0-9]+\.[0-9]+" | tail -n 1 } latest_tag=$(get_latest_tag) diff --git a/.circleci/scripts/tag.sh b/.circleci/scripts/tag.sh index 1a7ab2d..b22c488 100755 --- a/.circleci/scripts/tag.sh +++ b/.circleci/scripts/tag.sh @@ -4,11 +4,11 @@ set -e semver_regex_pattern="[0-9]+\.[0-9]+\.[0-9]+" latest_changelog_tag() { - grep -Po "(?<=\#\# \[)$semver_regex_pattern?(?=\])" CHANGELOG.md | cut -d"-" -f 1 | head -n 1 + grep -Po "(?<=\#\# \[)$semver_regex_pattern?(?=\])" CHANGELOG.md | head -n 1 } latest_git_tag() { - git tag -l | grep -E "^v$semver_regex_pattern" | cut -d"-" -f 1 | sort | tail -n 1 + git tag --sort=v:refname | grep -E "v$semver_regex_pattern" | tail -n 1 } tag_candidate="v$(latest_changelog_tag)" diff --git a/script/download.sh b/script/download.sh index 716bf71..a42aa8e 100755 --- a/script/download.sh +++ b/script/download.sh @@ -7,7 +7,7 @@ ARCH_TYPE=".tar.gz" TAR_FILE="$BINARY_NAME$ARCH_TYPE" latest_release() { - curl -sL -o /dev/null -w '%{url_effective}' "$RELEASES_URL/latest" | rev | cut -f1 -d'/'| rev + curl -sL -o /dev/null -w '%{url_effective}' "$RELEASES_URL/latest" | rev | cut -f 1 -d '/'| rev } remove_tmp_download() { From 7fc538a910e06d8985210699fb9e6660b36066ff Mon Sep 17 00:00:00 2001 From: Vladislav Trotsenko Date: Wed, 11 Jan 2023 20:15:53 +0100 Subject: [PATCH 2/2] Technical/Update releasing flow (#151) * Updated CI scripts (tag/release) * Updated download script * Updated changelog --- .circleci/scripts/tag.sh | 4 ++++ CHANGELOG.md | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/.circleci/scripts/tag.sh b/.circleci/scripts/tag.sh index b22c488..fd0814e 100755 --- a/.circleci/scripts/tag.sh +++ b/.circleci/scripts/tag.sh @@ -21,6 +21,10 @@ then echo "Pushing new semver tag to GitHub..." git tag "$tag_candidate" git push --tags + echo "Updating develop branch with new semver tag..." + git checkout develop + git merge "$tag_candidate" --ff --no-edit + git push origin develop else echo "Latest changelog tag ($tag_candidate) already released on GitHub. Tagging is not required." fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a01766..0410dbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.5] - 2023-01-11 + +### Updated + +- Updated `CI` scripts (tag/release) +- Updated download script + ## [2.0.4] - 2023-01-03 ### Updated