-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed security vulnerability issue CVE-2023-27530 * Added bunch of linters, configs * Added auto creating release notes on GitHub * Added auto releasing scripts * Updated runtime/development dependencies * Updated CircleCI/CodeClimate configs * Updated application version, changelog
- Loading branch information
Showing
8 changed files
with
174 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
GH_CLI_RELEASES_URL="https://github.com/cli/cli/releases" | ||
FILE_NAME="gh" | ||
BUILD_ARCHITECTURE="linux_amd64.deb" | ||
DELIMETER="_" | ||
PACKAGE_FILE="$FILE_NAME$DELIMETER$BUILD_ARCHITECTURE" | ||
|
||
gh_cli_latest_release() { | ||
curl -sL -o /dev/null -w '%{url_effective}' "$GH_CLI_RELEASES_URL/latest" | rev | cut -f 1 -d '/'| rev | ||
} | ||
|
||
download_gh_cli() { | ||
test -z "$VERSION" && VERSION="$(gh_cli_latest_release)" | ||
test -z "$VERSION" && { | ||
echo "Unable to get GitHub CLI release." >&2 | ||
exit 1 | ||
} | ||
curl -s -L -o "$PACKAGE_FILE" "$GH_CLI_RELEASES_URL/download/$VERSION/$FILE_NAME$DELIMETER$(printf '%s' "$VERSION" | cut -c 2-100)$DELIMETER$BUILD_ARCHITECTURE" | ||
} | ||
|
||
install_gh_cli() { | ||
sudo dpkg -i "$PACKAGE_FILE" | ||
rm "$PACKAGE_FILE" | ||
} | ||
|
||
get_release_candidate_tag() { | ||
git tag --sort=v:refname | grep -E "v[0-9]+\.[0-9]+\.[0-9]+" | tail -n 1 | ||
} | ||
|
||
RELEASE_CANDIDATE_TAG=$(get_release_candidate_tag) | ||
|
||
release_to_github() { | ||
echo "Downloading and installing latest gh cli..." | ||
download_gh_cli | ||
install_gh_cli | ||
echo "Publishing new release notes to GitHub..." | ||
gh release create "$RELEASE_CANDIDATE_TAG" --generate-notes | ||
} | ||
|
||
release_to_github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
SEMVER_REGEX_PATTERN="[0-9]+\.[0-9]+\.[0-9]+" | ||
|
||
latest_changelog_tag() { | ||
grep -Po "(?<=\#\# \[)$SEMVER_REGEX_PATTERN?(?=\])" CHANGELOG.md | head -n 1 | ||
} | ||
|
||
latest_git_tag() { | ||
git tag --sort=v:refname | grep -E "v$SEMVER_REGEX_PATTERN" | tail -n 1 | ||
} | ||
|
||
TAG_CANDIDATE="v$(latest_changelog_tag)" | ||
|
||
if [ "$TAG_CANDIDATE" != "$(latest_git_tag)" ] | ||
then | ||
echo "Configuring git..." | ||
git config --global user.email "${PUBLISHER_EMAIL}" | ||
git config --global user.name "${PUBLISHER_NAME}" | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ checks: | |
plugins: | ||
rubocop: | ||
enabled: true | ||
channel: rubocop-1-43 | ||
channel: rubocop-1-48 | ||
|
||
reek: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module TruemailServer | ||
VERSION = '0.6.0' | ||
VERSION = '0.7.0' | ||
end |