terraform-switcher icon indicating copy to clipboard operation
terraform-switcher copied to clipboard

Update Golang Package Version on pkg.go

Open xavipanda opened this issue 2 years ago • 3 comments

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

xavipanda avatar Aug 27 '21 08:08 xavipanda

Please elaborate

warrensbox avatar Nov 29 '21 03:11 warrensbox

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.

psihachina avatar Mar 14 '22 11:03 psihachina

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

leosunmo avatar Jul 12 '23 10:07 leosunmo

Out of interest: any hints on how the https://pkg.go.dev/github.com/warrensbox/terraform-switcher gets updated?

yermulnik avatar Apr 02 '24 12:04 yermulnik

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?

MatrixCrawler avatar Apr 03 '24 07:04 MatrixCrawler

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 avatar Apr 03 '24 07:04 MatrixCrawler

@MatrixCrawler I've added my thoughts to #354 — lety's get hold of @warrensbox to discuss this "feature".

yermulnik avatar Apr 03 '24 14:04 yermulnik