terraform-switcher
terraform-switcher copied to clipboard
Update Golang Package Version on pkg.go
Actually a very old version is in there and miss most of the existing functions, would be nice to get this updated in the pkg.go repo
Please elaborate
Hi, @warrensbox
In pkg.go terraform-switcher is not updated due to the version tag. The version tag must contain the letter "v". It would be great if you fixed this, then me and anyone else could use your package in other projects.
This is currently biting me as well. Go is unaware of anything newer than v0.1.0 as seen in https://pkg.go.dev/github.com/warrensbox/terraform-switcher
For anyone wanting to work around it, select the version you want in Releases, and use the commit hash. For example, for release "0.13.1308",
go get -u github.com/warrensbox/terraform-switcher@70e50f91354ca2273bce74dc4aad107c567d4784
Out of interest: any hints on how the https://pkg.go.dev/github.com/warrensbox/terraform-switcher gets updated?
See https://pkg.go.dev/about#adding-a-package
Data for the site is downloaded from proxy.golang.org. We monitor the Go Module Index regularly for new packages to add to pkg.go.dev. If you don’t see a package on pkg.go.dev, you can add it by doing one of the following:
Visiting that page on pkg.go.dev, and clicking the “Request” button. For example: https://pkg.go.dev/example.com/my/module
Making a request to proxy.golang.org for the module version, to any endpoint specified by the Module proxy protocol. For example: https://proxy.golang.org/example.com/my/module/@v/v1.0.0.info
Downloading the package via the go command. For example: GOPROXY=https://proxy.golang.org GO111MODULE=on go get example.com/my/[email protected]
As i understand a request to https://proxy.golang.org/example.com/my/module/@v/v1.0.0.info on release should do the trick?
Here is a description how to add it to github actions (pretty far down the page) https://forcepush.tech/go-package-ci-cd-with-git-hub-actions
jobs:
bump-index:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/[email protected]
- name: Ping endpoint
run: curl "https://proxy.golang.org/github.com/warrensbox/terraform-switcher/@v/$(git describe HEAD --tags --abbrev=0).info"
@MatrixCrawler I've added my thoughts to #354 — lety's get hold of @warrensbox to discuss this "feature".