Skip to content

Commit

Permalink
Merge pull request #152 from mocktools/develop
Browse files Browse the repository at this point in the history
Golang smtpmock v2.0.5
  • Loading branch information
bestwebua authored Jan 11, 2023
2 parents be5712c + 7fc538a commit 1a98bcd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 6 additions & 2 deletions .circleci/scripts/tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand All @@ -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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion script/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 1a98bcd

Please sign in to comment.