Skip to content

Commit 518c059

Browse files
authored
chore: initial setup of repository (#1)
1 parent b587245 commit 518c059

14 files changed

Lines changed: 620 additions & 1 deletion

File tree

.github/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (c) 2021 Gemba Advantage
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# in the Software without restriction, including without limitation the rights
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
version: 2
22+
updates:
23+
- package-ecosystem: "github-actions"
24+
directory: "/"
25+
schedule:
26+
interval: "daily"
27+
- package-ecosystem: gomod
28+
directory: /
29+
schedule:
30+
interval: daily

.github/stale.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright (c) 2021 Gemba Advantage
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# in the Software without restriction, including without limitation the rights
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
# Configuration for probot-stale - https://github.com/probot/stale
22+
23+
# Number of days of inactivity before an issue becomes stale
24+
daysUntilStale: 14
25+
26+
# Number of days of inactivity before a stale issue is closed
27+
daysUntilClose: 7
28+
29+
# Issues with these labels will never be considered stale
30+
exemptLabels:
31+
- pinned
32+
- security
33+
34+
# Label to use when marking an issue as stale
35+
staleLabel: wontfix
36+
37+
# Comment to post when marking an issue as stale. Set to `false` to disable
38+
markComment: >
39+
This issue has been automatically marked as stale because it has not had
40+
recent activity. It will be closed if no further activity occurs. Thank you
41+
for your contributions.
42+
43+
# Comment to post when closing a stale issue. Set to `false` to disable
44+
closeComment: false

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright (c) 2021 Gemba Advantage
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# in the Software without restriction, including without limitation the rights
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
name: ci
22+
on:
23+
push:
24+
branches:
25+
- main
26+
pull_request:
27+
jobs:
28+
ci:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
with:
34+
fetch-depth: 0
35+
token: ${{ secrets.GH_UPLIFT }}
36+
- name: Setup Go
37+
uses: actions/setup-go@v2
38+
with:
39+
go-version: 1.16
40+
- name: Lint
41+
uses: golangci/golangci-lint-action@v2
42+
with:
43+
skip-go-installation: true
44+
- name: Test
45+
run: make test
46+
- name: Code Coverage
47+
uses: codecov/codecov-action@v2.0.3
48+
- name: Build
49+
run: make build
50+
- name: Tag
51+
if: github.ref == 'refs/heads/main'
52+
uses: gembaadvantage/uplift-action@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GH_UPLIFT }}

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright (c) 2021 Gemba Advantage
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# in the Software without restriction, including without limitation the rights
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
name: release
22+
on:
23+
push:
24+
tags:
25+
- "v*.*.*"
26+
jobs:
27+
goreleaser:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
with:
33+
fetch-depth: 0
34+
- name: Setup Go
35+
uses: actions/setup-go@v2
36+
with:
37+
go-version: 1.16
38+
- name: Import GPG key
39+
id: import_gpg
40+
uses: hashicorp/ghaction-import-gpg@v2.1.0
41+
env:
42+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
43+
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
44+
- name: GoReleaser
45+
uses: goreleaser/goreleaser-action@v2
46+
with:
47+
version: latest
48+
args: release --rm-dist
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GH_GORELEASER }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313

1414
# Dependency directories (remove the comment below to include it)
1515
# vendor/
16+
17+
# Built binary
18+
bin/

.golangci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright (c) 2021 Gemba Advantage
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# in the Software without restriction, including without limitation the rights
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
run:
22+
timeout: 2m
23+
24+
linters:
25+
disable-all: true
26+
enable:
27+
- deadcode
28+
- dupl
29+
- gofmt
30+
- goimports
31+
- gosimple
32+
- govet
33+
- ineffassign
34+
- misspell
35+
- nakedret
36+
- revive
37+
- staticcheck
38+
- structcheck
39+
- unused
40+
- varcheck
41+
42+
linters-settings:
43+
gofmt:
44+
simplify: true
45+
dupl:
46+
threshold: 400

.goreleaser.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Copyright (c) 2021 Gemba Advantage
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# in the Software without restriction, including without limitation the rights
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
builds:
22+
- id: git-remote-codecommit
23+
main: ./cmd/grc
24+
binary: git-remote-codecommit
25+
ldflags:
26+
- -s -w
27+
- -X github.com/gembaadvantage/git-remote-codecommit/internal/version.version={{.Tag}}
28+
- -X github.com/gembaadvantage/git-remote-codecommit/internal/version.gitCommit={{.Commit}}
29+
- -X github.com/gembaadvantage/git-remote-codecommit/internal/version.gitBranch=main
30+
- -X github.com/gembaadvantage/git-remote-codecommit/internal/version.buildDate={{.Date}}
31+
env:
32+
- CGO_ENABLED=0
33+
goos:
34+
- linux
35+
- darwin
36+
- windows
37+
goarch:
38+
- amd64
39+
- 386
40+
- arm
41+
- arm64
42+
- ppc64le
43+
goarm:
44+
- 7
45+
ignore:
46+
- goos: darwin
47+
goarch: 386
48+
archives:
49+
- id: git-remote-codecommit-archive
50+
format: tar.gz
51+
name_template: |-
52+
{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}-{{ .Arch }}
53+
builds:
54+
- git-remote-codecommit
55+
replacements:
56+
386: i386
57+
amd64: x86_64
58+
format_overrides:
59+
- goos: windows
60+
format: zip
61+
files:
62+
- README.md
63+
- LICENSE
64+
signs:
65+
- artifacts: checksum
66+
brews:
67+
- name: git-remote-codecommit
68+
tap:
69+
owner: gembaadvantage
70+
name: homebrew-tap
71+
folder: Formula
72+
homepage: "https://github.com/gembaadvantage/git-remote-codecommit"
73+
description: "Semantic versioning the easy way"
74+
license: MIT
75+
install: |
76+
bin.install "git-remote-codecommit"
77+
test: |
78+
installed_version = shell_output("#{bin}/git-remote-codecommit version --short 2>&1")
79+
assert_match "v#{version}", installed_version
80+
scoop:
81+
bucket:
82+
owner: gembaadvantage
83+
name: scoops
84+
homepage: "https://github.com/gembaadvantage/git-remote-codecommit"
85+
description: "Semantic versioning the easy way"
86+
license: MIT

.uplift.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2021 Gemba Advantage
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# in the Software without restriction, including without limitation the rights
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
firstVersion: v1.0.0

0 commit comments

Comments
 (0)