-
-
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.
Merge pull request #94 from truemail-rb/develop
Truemail server v0.7.0
- Loading branch information
Showing
22 changed files
with
390 additions
and
142 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,4 @@ | ||
--- | ||
|
||
ignore: | ||
- EXA-MPLE-XXXX |
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,31 @@ | ||
--- | ||
|
||
enableGlobDot: true | ||
|
||
patterns: | ||
- name: GithubUser | ||
pattern: /\[@.+\]/gmx | ||
- name: MarkdownCode | ||
pattern: /`{1,3}.+`{1,3}/gmx | ||
- name: MarkdownCodeBlock | ||
pattern: /^\s*```[\s\S]*?^\s*```/gmx | ||
|
||
languageSettings: | ||
- languageId: markdown | ||
ignoreRegExpList: | ||
- GithubUser | ||
- MarkdownCode | ||
- MarkdownCodeBlock | ||
|
||
words: | ||
- Commiting | ||
- Gitter | ||
- Healthcheck | ||
- Trotsenko | ||
- Truemail | ||
- Vladislav | ||
- bestwebua | ||
- codebases | ||
- dockerized | ||
- nameserver's |
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,4 @@ | ||
--- | ||
|
||
exclude_paths: | ||
- '.circleci/**/*.rb' |
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,39 @@ | ||
--- | ||
|
||
no_tty: true | ||
skip_output: | ||
- meta | ||
|
||
code-style-linters: | ||
commands: | ||
reek: | ||
run: bundle exec reek | ||
rubocop: | ||
run: bundle exec rubocop -c '.circleci/linter_configs/.rubocop.yml' | ||
shellcheck: | ||
glob: '*.{sh}' | ||
run: shellcheck --norc {all_files} | ||
yamllint: | ||
run: yamllint -c '.circleci/linter_configs/.yamllint.yml' . | ||
|
||
code-performance-linters: | ||
commands: | ||
fasterer: | ||
run: bundle exec fasterer | ||
|
||
code-vulnerability-linters: | ||
commands: | ||
bundle-audit: | ||
run: bundle exec bundle-audit check -c '.circleci/linter_configs/.bundler-audit.yml' --update | ||
|
||
code-documentation-linters: | ||
commands: | ||
cspell: | ||
run: cspell-cli lint -c '.circleci/linter_configs/.cspell.yml' '**/*.{txt,md}' | ||
markdownlint: | ||
run: markdownlint -c '.circleci/linter_configs/.markdownlint.yml' '**/*.md' | ||
|
||
release-linters: | ||
commands: | ||
changeloglint: | ||
run: .circleci/scripts/changeloglint.sh |
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,9 @@ | ||
--- | ||
|
||
default: true | ||
|
||
MD013: | ||
line_length: 500 | ||
|
||
MD024: | ||
siblings_only: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
extends: default | ||
|
||
rules: | ||
line-length: | ||
max: 200 |
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,22 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
changelog=$(if [ "$1" = "" ]; then echo "CHANGELOG.md"; else echo "$1"; fi) | ||
|
||
get_current_application_version() { | ||
ruby -r rubygems -e "require_relative 'app/truemail_server/version'; puts TruemailServer::VERSION" | ||
} | ||
|
||
latest_changelog_tag() { | ||
grep -Po "(?<=\#\# \[)[0-9]+\.[0-9]+\.[0-9]+?(?=\])" "$changelog" | head -n 1 | ||
} | ||
|
||
current_application_version="$(get_current_application_version)" | ||
|
||
if [ "$current_application_version" = "$(latest_changelog_tag)" ] | ||
then | ||
echo "SUCCESS: Current application version ($current_application_version) has been found on the top of project changelog." | ||
else | ||
echo "FAILURE: Following to \"Keep a Changelog\" convention current application version ($current_application_version) must be mentioned on the top of project changelog." | ||
exit 1 | ||
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 |
---|---|---|
@@ -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 |
Oops, something went wrong.