-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support all grc codecommit variants (#28)
- Loading branch information
Showing
19 changed files
with
119 additions
and
140 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2021 Gemba Advantage | ||
# Copyright (c) 2022 Gemba Advantage | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -36,19 +36,32 @@ jobs: | |
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
go-version: 1.17 | ||
- name: Cache Go | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Install Task | ||
uses: arduino/setup-task@v1 | ||
- name: Lint | ||
uses: golangci/[email protected] | ||
with: | ||
skip-go-installation: true | ||
- name: Test | ||
run: make test | ||
run: task test | ||
- name: Code Coverage | ||
uses: codecov/[email protected] | ||
- name: Build | ||
run: make build | ||
run: task build | ||
- name: Tag | ||
if: github.ref == 'refs/heads/main' | ||
uses: gembaadvantage/uplift-action@v1 | ||
uses: gembaadvantage/[email protected] | ||
with: | ||
args: tag | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_UPLIFT }} |
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,4 +1,4 @@ | ||
# Copyright (c) 2021 Gemba Advantage | ||
# Copyright (c) 2022 Gemba Advantage | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -34,7 +34,7 @@ jobs: | |
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
go-version: 1.17 | ||
- name: Import GPG key | ||
id: import_gpg | ||
uses: hashicorp/[email protected] | ||
|
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
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,65 @@ | ||
# Copyright (c) 2022 Gemba Advantage | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# in the Software without restriction, including without limitation the rights | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
version: "3" | ||
|
||
vars: | ||
BINDIR: bin | ||
BINNAME: git-remote-codecommit | ||
GIT_COMMIT: | ||
sh: git rev-parse HEAD | ||
GIT_SHA: | ||
sh: git rev-parse --short HEAD | ||
GIT_BRANCH: | ||
sh: git branch --show-current | ||
LDFLAGS: > | ||
-X github.com/gembaadvantage/git-remote-codecommit/internal/version.version=dev-{{.GIT_SHA}} | ||
-X github.com/gembaadvantage/git-remote-codecommit/internal/version.gitCommit={{.GIT_COMMIT}} | ||
-X github.com/gembaadvantage/git-remote-codecommit/internal/version.gitBranch={{.GIT_BRANCH}} | ||
-X github.com/gembaadvantage/git-remote-codecommit/internal/version.buildDate={{now | date "2006-01-02T15:04:05Z07:00"}} | ||
tasks: | ||
default: | ||
desc: Runs all of the default tasks | ||
cmds: | ||
- task: clean | ||
- task: lint | ||
- task: test | ||
- task: build | ||
|
||
build: | ||
desc: Build the git-remote-codecommit binary | ||
cmds: | ||
- go build -ldflags '-s -w {{.LDFLAGS}}' -o '{{.BINDIR}}/{{.BINNAME}}' ./cmd/grc | ||
|
||
test: | ||
desc: Run the tests | ||
cmds: | ||
- go test -race -vet=off -p 1 -covermode=atomic -coverprofile=coverage.out ./... | ||
|
||
lint: | ||
desc: Lint the code using golangci | ||
cmds: | ||
- golangci-lint run --timeout 5m0s | ||
|
||
clean: | ||
desc: Remove any built artifacts | ||
cmds: | ||
- rm -rf {{.BINDIR}} |
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
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.