forked from asdf-vm/asdf
-
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.
- Loading branch information
Showing
146 changed files
with
13,824 additions
and
995 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build Binaries for Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
jobs: | ||
build: | ||
name: Build release binaries | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# windows isn't working on windows right now, add it to this list once | ||
# I fix the code. | ||
goos: [linux, darwin] | ||
goarch: ["386", amd64, arm64] | ||
exclude: | ||
- goarch: "386" | ||
goos: darwin | ||
#- goarch: arm64 | ||
# goos: windows | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Compute asdf version | ||
id: asdf-version | ||
shell: bash | ||
run: echo "version=$(./scripts/asdf-version)" >> "$GITHUB_OUTPUT" | ||
- name: Build Go binaries | ||
uses: wangyoucao577/go-release-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: "1.23.4" | ||
binary_name: "asdf" | ||
project_path: ./cmd/asdf | ||
release_tag: ${{ github.event.release.tag_name }} | ||
release_name: ${{ github.event.release.tag_name }} | ||
ldflags: -s -X main.version=${{ github.event.release.tag_name }} |
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 |
---|---|---|
|
@@ -14,3 +14,18 @@ jobs: | |
- uses: amannn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
scopes: | | ||
# The scope for all the Golang rewrite commits | ||
golang-rewrite | ||
# A list of all used scopes can be computed by running this command: | ||
# | ||
# git log --pretty=format:%s | rg '^[^: ]*\(([^):]*)\).*' -r '$1' | sort | uniq | ||
# | ||
# We only want to allow a limited set of scopes going forward, so | ||
# the list of valid scopes has been pared down here. | ||
docs | ||
website | ||
plugin | ||
completions | ||
deps |
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,8 +1,9 @@ | ||
/installs | ||
/downloads | ||
/plugins | ||
/shims | ||
repository | ||
.vagrant | ||
keyrings | ||
/tmp | ||
|
||
dist/ |
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,15 @@ | ||
{ | ||
"bump-minor-pre-major": true, | ||
"changelog-types": | ||
[ | ||
{ "type": "feat", "section": "Features", "hidden": false }, | ||
{ "type": "fix", "section": "Patches", "hidden": false }, | ||
{ "type": "docs", "section": "Documentation", "hidden": false } | ||
], | ||
"extra-files": [ | ||
"SECURITY.md" | ||
"docs/guide/getting-started.md" | ||
"docs/pt-br/guide/getting-started.md" | ||
"docs/zh-hans/guide/getting-started.md" | ||
] | ||
} |
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,3 +1,4 @@ | ||
golang 1.23.4 | ||
bats 1.8.2 | ||
shellcheck 0.9.0 | ||
shfmt 3.6.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,39 @@ | ||
MAIN_PACKAGE_PATH := ./cmd/asdf | ||
TARGET_DIR := . | ||
TARGET := asdf | ||
FULL_VERSION = $(shell ./scripts/asdf-version ) | ||
LINKER_FLAGS = '-s -X main.version=${FULL_VERSION}' | ||
|
||
# Not sure what the default location should be for builds | ||
build: # test lint | ||
go build -ldflags=${LINKER_FLAGS} -o=${TARGET_DIR}/${TARGET} ${MAIN_PACKAGE_PATH} | ||
|
||
fmt: | ||
go fmt ./... | ||
go run mvdan.cc/gofumpt -l -w . | ||
|
||
verify: | ||
go mod verify | ||
|
||
tidy: | ||
go mod tidy -v | ||
|
||
audit: verify vet test | ||
|
||
test: | ||
go test -coverprofile=/tmp/coverage.out -bench= -race ./... | ||
|
||
cover: test | ||
go tool cover -html=/tmp/coverage.out | ||
|
||
lint: fmt | ||
go run honnef.co/go/tools/cmd/staticcheck -tests -show-ignored ./... | ||
go run github.com/mgechev/revive -set_exit_status ./... | ||
|
||
vet: fmt | ||
go vet ./... | ||
|
||
run: build | ||
${TARGET_DIR}/${TARGET} | ||
|
||
.PHONY: fmt lint vet build test run |
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.