-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e21ba4
commit 7230495
Showing
12 changed files
with
281 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[run] | ||
deadline = "5m" | ||
|
||
[issues] | ||
exclude = [ | ||
# golint: False positives for multi-file packages | ||
'should have a package comment', | ||
# gosec: Duplicate of errcheck | ||
'G104: Errors unhandled', | ||
] | ||
exclude-rules = [ | ||
{ | ||
path = '_test\.go', | ||
linters = [ | ||
'dupl', | ||
'goconst', | ||
'gocyclo', | ||
'scopelint', | ||
'lll', | ||
] | ||
}, | ||
] | ||
exclude-use-default = false | ||
|
||
[linters] | ||
enable-all = true | ||
disable = [ | ||
"gochecknoglobals", # There are valid use cases for globals | ||
"maligned", # Readability is more important than saving bytes | ||
] | ||
|
||
[linters-settings] | ||
|
||
[linters-settings.errcheck] | ||
exclude = "./ci/lint/errcheck-exclude.txt" | ||
|
||
[linters-settings.goconst] | ||
min-len = 0 | ||
min-occurrences = 3 | ||
|
||
[linters-settings.gocyclo] | ||
min-complexity = 10 | ||
|
||
[linters-settings.golint] | ||
min-confidence = 0.0 | ||
|
||
[linters-settings.govet] | ||
check-shadowing = true | ||
|
||
[linters-settings.misspell] | ||
locale = "US" | ||
|
||
[linters-settings.nakedret] | ||
max-func-lines = 0 |
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 @@ | ||
(io.Closer).Close | ||
(net/http.ResponseWriter).Write | ||
os.Setenv | ||
(github.com/hashicorp/consul/api.Lock).Unlock |
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,55 @@ | ||
#!/bin/sh | ||
# Copyright 2019 The Morning Consult, LLC or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You may | ||
# not use this file except in compliance with the License. A copy of the | ||
# License is located at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# or in the "license" file accompanying this file. This file is distributed | ||
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
# express or implied. See the License for the specific language governing | ||
# permissions and limitations under the License. | ||
|
||
set -eu | ||
|
||
apk add -qU --no-cache --no-progress git | ||
|
||
git config --global user.email "${GITHUB_EMAIL}" | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
|
||
readonly GIT_CHGLOG_VERSION="0.8.0" | ||
|
||
# Download git-chglog | ||
wget --output-document=/usr/local/bin/git-chglog --quiet \ | ||
"https://github.com/git-chglog/git-chglog/releases/download/${GIT_CHGLOG_VERSION}/git-chglog_linux_amd64" | ||
|
||
# Make it executable | ||
chmod a+x /usr/local/bin/git-chglog | ||
|
||
# Clone the repo | ||
git clone repo repo-dirty | ||
|
||
cd repo-dirty | ||
|
||
# Install dependencies | ||
pip install --quiet --requirement ./ci/release/requirements.txt | ||
|
||
# Get the latest version | ||
readonly VERSION="$( python ./ci/release/version.py )" | ||
|
||
if [ "${VERSION}" = "" ]; then | ||
exit 0 | ||
fi | ||
|
||
echo "${VERSION}" > ./VERSION | ||
|
||
git-chglog --output ./CHANGELOG.md | ||
|
||
# Add and commit changed files | ||
git add ./VERSION ./CHANGELOG.md | ||
git commit -m "chore: Bump version and update changelog [ci skip]" | ||
|
||
# Tag the repo with the latest version | ||
git tag "${VERSION}" |
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,2 @@ | ||
GitPython | ||
semantic_version |
Oops, something went wrong.