-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added new bunch of project linters * Added auto deploy to RubyGems * Added auto creating release notes on GitHub * Added lefthook config, removed overcommit * Updated gemspecs * Updated codeclimate/circleci configs * Updated gem development dependencies * Updated gem version, changelog
- Loading branch information
Showing
20 changed files
with
252 additions
and
101 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
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,5 @@ | ||
--- | ||
|
||
exclude_paths: | ||
- '.circleci/**/*.rb' | ||
- 'spec/dns_mock/record/builder/mx_spec.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,8 @@ | ||
# frozen_string_literal: true | ||
|
||
all | ||
rule 'MD013', line_length: 500 | ||
rule 'MD029', style: :ordered | ||
exclude_rule 'MD007' | ||
exclude_rule 'MD010' | ||
exclude_rule 'MD024' |
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,5 @@ | ||
--- | ||
|
||
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,58 @@ | ||
# !/bin/sh | ||
set -e | ||
|
||
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} "$RELEASES_URL/latest" | rev | cut -f1 -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" "$RELEASES_URL/download/$VERSION/$FILE_NAME$DELIMETER${VERSION:1}$DELIMETER$BUILD_ARCHITECTURE" | ||
} | ||
|
||
install_gh_cli() { | ||
sudo dpkg -i "$PACKAGE_FILE" | ||
rm "$PACKAGE_FILE" | ||
} | ||
|
||
get_release_candidate_version() { | ||
echo $(ruby -r rubygems -e "puts Gem::Specification::load('$(ls *.gemspec)').version") | ||
} | ||
|
||
release_candidate_tag="v$(get_release_candidate_version)" | ||
|
||
is_an_existing_github_release() { | ||
git fetch origin "refs/tags/$release_candidate_tag" >/dev/null 2>&1 | ||
} | ||
|
||
release_to_rubygems() { | ||
echo "Setting RubyGems publisher credentials..." | ||
./.circleci/scripts/set_publisher_credentials.sh | ||
echo "Publishing new gem release to RubyGems..." | ||
git stash | ||
git checkout develop | ||
rake release | ||
} | ||
|
||
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 | ||
} | ||
|
||
if is_an_existing_github_release | ||
then echo "Tag $release_candidate_tag already exists on GitHub. Skipping releasing flow..." | ||
else release_to_rubygems; release_to_github | ||
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,12 @@ | ||
# !/bin/sh | ||
set -e | ||
set +x | ||
mkdir -p ~/.gem | ||
|
||
cat << EOF > ~/.gem/credentials | ||
--- | ||
:rubygems_api_key: ${RUBYGEMS_API_KEY} | ||
EOF | ||
|
||
chmod 0600 ~/.gem/credentials | ||
set -x |
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
Oops, something went wrong.