Commit Graph

78 Commits

Author SHA1 Message Date
Austin Cawley-Edwards
0f6f356b85
Add dynamic GOROOT setting for zsh (#56)
Co-authored-by: Kenny Parnell <k.parnell@gmail.com>
2023-05-09 10:40:46 -04:00
Kenny Parnell
99f0baf0af
Add Specs (#96)
* Initialize shellspec and add to workflow.

* Automatic Yes to shellspec prompts.

* Install and Run ShellSpec as one job.

* Add find to debug action.

* Use shellspec in lib dir.

* Run ShellSpec on matrix

* Add shellspec to it's own workflow.

* Move shellspec.yml back into main.yml because checkout.
2023-05-09 10:39:09 -04:00
Windymelt
be7daa8c57
avoid using stdin and use fd (#87)
Closes #90
2023-05-09 10:34:48 -04:00
Kenny Parnell
f006a12d6e
Add ASDF_GOLANG_SKIP_CHECKSUM to skip verifying checksum. (#95)
Update README
2022-12-17 00:10:23 -05:00
Kenny Parnell
c38b6d3ed2
Don't call back into asdf list golang (#93) 2022-12-16 23:43:41 -05:00
Kenny Parnell
1c2311264e
Revert "fix: replace google with go url (#88)" (#94)
This reverts commit ae1c810a85.
2022-12-16 23:34:04 -05:00
Julien Bongars
ae1c810a85
fix: replace google with go url (#88)
Co-authored-by: julien <julien@undercurrent.tech>
2022-12-16 23:32:12 -05:00
Eric Miller
cc8bc47d48
Filter latest version on user input (#74)
Fixes issue #73
2022-03-07 09:35:25 -05:00
Jesús Miguel Benito Calzada
353cca617b
Make exec-env strict-mode compliant (#72)
This file is not bash strict-mode compliant and because of that, if you execute it from a script in strict mode, it will through an error like follows:

WARN Failed to discover go env: failed to run 'go env': exit status 1
ERRO Running error: context loading failed: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: /Users/myuser/.asdf/plugins/golang/bin/exec-env: line 4: GOROOT: unbound variable
2022-02-28 14:57:22 -05:00
Kenny Parnell
ffd0efbabd
Include go install in reshim note. 2022-02-28 14:46:41 -05:00
Kenny Parnell
71424d8ed1
actually add new latest-stable script 2022-02-09 15:14:59 -05:00
Kenny Parnell
2dad3faf58
Make sure latest is actually available. 2022-02-09 15:12:28 -05:00
Kenny Parnell
03d30a52ae
Append @latest if doing install and version isn't specified. 2022-02-09 14:30:28 -05:00
John Maguire
89ced07d86
Updated the default packages command to use "go install" for versions 1.16+ (#67)
* Updated the default packages command to use "go install" for versions
greater than 1.16

* Cleaning up for linting, added condition to also check major version

* Update Version Parsing

Attempts to make shell check happy.

Co-authored-by: john.maguire <john.maguire@cbinsights.com>
Co-authored-by: Kenny Parnell <k.parnell@gmail.com>
2022-02-09 14:18:21 -05:00
Kenny Parnell
4aed736821
Always Run CI 2021-11-17 11:50:58 -05:00
Kenny Parnell
d2660cee3b
Replace Travis with Github Actions 2021-11-17 11:42:24 -05:00
Kenny Parnell
16711481cb
Fix Github Workflow command. 2021-11-17 11:37:52 -05:00
Kenny Parnell
0e19db49a8
Create main.yml 2021-11-17 11:36:01 -05:00
Kenny Parnell
09f1801f10
Speed Up list-all/latest (#63)
* Switch to git ls-remote instead of parsing bucket.

* Update README to point to Travis.com
2021-11-16 09:58:02 -05:00
Michael Poutre
85dab2f4f2
Add ASDF_GOLANG_OVERWRITE_ARCH override option (#62)
* Add ASDF_GOLANG_OVERWRITE_ARCH override option

This change adds an ASDF_GOLANG_OVERWRITE_ARCH variable to allow overriding the architecture. This is useful if you need to install version of Go that were not released for macOS ARM. This is also done in the asdf terraform plugin: e1c7eea0f7/bin/install (L115-L129)

* Update README to include section about ASDF_GOLANG_OVERWRITE_ARCH
2021-10-28 17:03:53 -04:00
William Poetra Yoga
4f8976deb0
Prevent double-downloading installation archive (#61)
This small change prevents `asdf` from downloading the installation archive twice. This reverts a line change from #54.

Side note: according to https://asdf-vm.com/plugins/create.html, `bin/download` should do the downloading, not `bin/install`.
2021-10-20 13:12:58 -04:00
Jake Romer
0d0f2320b8
Document ASDF_GOLANG_DEFAULT_PACKAGES_FILE (#60)
This patch adds documentation for the ASDF_GOLANG_DEFAULT_PACKAGES_FILE variable introduced in #59.
2021-09-09 14:14:08 -04:00
Jake Romer
337e60ef60
Check env var for default package list (#59)
Source the default package list from the env var `$ASDF_GOLANG_DEFAULT_PACKAGES_FILE`, defaulting to `${HOME}/.default-golang-pks` if the former is not set.
2021-08-25 20:37:15 -04:00
Kenny Parnell
92a2e61081 Cleanup ShellCheck warnings. 2021-06-16 10:46:00 -04:00
LouDou
cb8678e87e
Fix the install script (#54)
- Allows ASDF_DOWNLOAD_PATH to be unset or empty
- Ensure the download actually happens
- Clean up temp dir after download and installation
2021-06-16 10:33:28 -04:00
Craig Furman
bc51a8097f
Use highest matching minor version from go.mod (#50)
The go directive in go.mod files is of the format `major.minor`. This
commit will allow the highest installed version of go with the same
major component to be selected. The previous behaviour was to use the
highest installed version with the same major _and_ minor components,
but I don't think this was strictly necessary. It is valid to use go
1.16 to build a project whose go.mod declares "go 1.14", for example.
For packages within the module, the compiler should reject use of
language features introduced after the version specified by the go
directive.

I think this adheres more closely to the expected behaviour of programs
that parse `go.mod`, and asdf users who need to pin a particular minor
or patch version of go can use `.tool-versions` or `.go-version`.

Source: https://golang.org/ref/mod#go-mod-file-go
2021-06-16 08:04:20 -04:00
w1mvy
36f12c9393
Exit when download status 404 or 403 (#55) 2021-06-15 20:42:59 -04:00
Samuel García
625e8a23ce
Add extra space between sha256sum args (#52) 2021-06-15 17:09:39 -04:00
Alex Rudd
1f388f1b6a
Add extra space between shasum args (#49) 2021-05-12 13:46:48 -04:00
Kenny Parnell
9480360cc6
Add help texts per plugin guidelins. (#46) 2021-01-04 19:19:48 -05:00
Kenny Parnell
b1990b0a23
Add bin/download per latest asdf guidelines (#45)
- Creates a temporary directory if using an older version of asdf.
- Install delegates to bin/download if using an older version of asdf.
2021-01-04 17:36:54 -05:00
BeanNan
3950f3633c
add check_shasum (#44)
* add check_sum

* Update README

* fix typo
2021-01-04 13:18:00 -05:00
Tomoyuki Harada
ab7c352e73
Set default GOPATH and GOROOT when installing default go pkgs (#43)
* set `GOROOT` and `GOPATH` in install_default_go_pkgs()

* quote paths

* pass GOROOT and GOPATH to the go command when installing default
packages

* remove unnecessary variable
2021-01-04 13:16:46 -05:00
Tomoyuki Harada
590a00cd20
fix: invalid asdf path in install_default_golang_pkgs() (#40)
* fix: invalid asdf path in `install_default_golang_pkgs()`

* no need to perform reshim in plugin's install

reshim should be performed in asdf when plugin's `bin/install` returns 0
2021-01-01 19:09:06 -05:00
Jerred Shepherd
958693df90
Support M1 ARM chip (#42)
Fix error `Arch 'arm64' not supported!` during install on M1 ARM chip
2020-12-08 13:47:15 -05:00
Tomoyuki Harada
aaf9769563
fixes #38 (#39)
* fixes #38

* quote paths
2020-12-08 13:38:53 -05:00
David Marcin
ddffda95d5
Fix PATH for new go install (#41) 2020-12-08 13:35:19 -05:00
Michael Hale
9297fbefb1
Find the most recent matching installed version (#34)
* Find the most recent matching installed version

* pin match to beginning of string
2020-07-13 16:30:56 -04:00
Jack McCown
44abfc842f
feat: support auto go get default packages (#30) 2020-06-16 18:11:29 -04:00
Michael Hale
b7780500cf
Extract version from go.mod files (#32)
* Extract version from go.mod files

* make it work on linux too

* whitespace

* ignore asdf testing checkout

* fix test
2020-06-16 18:08:17 -04:00
uzxmx
831b8db058
Switch to dl.google.com
* Update default url when installing

Signed-off-by: Mingxiang Xue <mingxiangxue@gmail.com>

* Cleanup unneeded BASE_URL

Signed-off-by: Mingxiang Xue <mingxiangxue@gmail.com>
2020-05-11 23:14:25 -04:00
Trung Lê
b93b58b69e Support ppc64le architecture (#26)
* Support ppc64le version of Go

* Mention about ppc64le architecture in the README

* Test multi-arch on Travis CI

* Use commit SHA for plugin-gitref
2020-01-27 17:41:36 -05:00
Kenny Parnell
9a3e2cb87b
Merge pull request #25 from matt-e/support-aarch64
Support aarch64 (arm64)

Thanks @matt-e
2019-09-17 22:21:09 -04:00
Kenny Parnell
0c9024e71f Merge branch 'master' of github.com:kennyp/asdf-golang 2019-09-10 22:57:47 -04:00
Kenny Parnell
864d15576a Add note on using go get
Closes #18
2019-09-10 22:57:17 -04:00
Matthew Eddey
c6f1673d78 Support aarch64 (arm64) 2019-08-23 08:17:07 -07:00
Kenny Parnell
8762d2d0e6
Merge pull request #24 from awilkins/use-legacy-filename
Allow use of legacy filenames
2019-07-16 09:27:14 -04:00
Adrian Wilkins
323efb2645 Removed redundant script 2019-07-16 14:15:27 +01:00
Adrian Wilkins
7345694413 Allow use of legacy filenames 2019-04-04 16:32:32 +01:00
Kenny Parnell
e28e53bf51
Update issue templates 2019-03-02 03:03:39 -05:00