terraform-switcher: Installation via install.sh fails for version 1.0.0

Installation fails using install.sh after release of v1.0.0

Describe alternatives you’ve considered A clear and concise description of any alternative solutions or features you’ve considered.

Additional context

Script output with debug:

warrensbox/terraform-switcher info checking GitHub for latest tag
warrensbox/terraform-switcher debug http_download https://github.com/warrensbox/terraform-switcher/releases/latest
warrensbox/terraform-switcher info found version: 1.0.0 for 1.0.0/linux/amd64
warrensbox/terraform-switcher debug downloading files into /tmp/tmp.7kYA692ao2
warrensbox/terraform-switcher debug http_download https://github.com/warrensbox/terraform-switcher/releases/download/1.0.0/terraform-switcher_1.0.0_linux_amd64.tar.gz
warrensbox/terraform-switcher debug http_download_curl received HTTP status 404

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 18
  • Comments: 30 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Related:

❯ brew install warrensbox/tap/tfswitch

Error: invalid attribute for formula 'warrensbox/tap/tfswitch': url ("https://github.com/warrensbox/terraform-switcher/releases/download/1.0.0/terraform-switcher_ 1.0.0_Darwin_arm64.tar.gz")
Please report this issue:

All of the artifacts contain a leading dot in the version:

terraform-switcher_.1.0.0_Darwin_amd64.tar.gz 

does the 1.0.0 have functionality impact

Should not 🤞🏻 None feature has been removed. No functional changes were applied. Some security updates were applied. Also some improvements for Windows OS were added. Plus some other minor improvements.

Oh, I missed lower vs upper case in platform names since the new automation 🤦🏻 Re-uploaded new checksums file with checksums added for lowercased filenames. install.sh should be good now 🤞🏻

All good! Thanks for the fix!

brew install warrensbox/tap/tfswitch
 [... REDACTED ...]
tfswitch 0.13.1308 is already installed but outdated (so it will be upgraded).
==> Fetching warrensbox/tap/tfswitch
==> Downloading https://github.com/warrensbox/terraform-switcher/releases/download/1.0.2/terraform-switcher_1.0.2_darwin_arm64.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/131640155/f47c966a-4513-49d7-b313-a5f91
################################################################################################################################## 100.0%
==> Upgrading warrensbox/tap/tfswitch
  0.13.1308 -> 1.0.2
  [... REDACTED ...]

@warrensbox Looks okay:

> curl -SsL https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash -s -- -b ~/tmp/test_tfswitch_install.sh latest
warrensbox/terraform-switcher info checking GitHub for tag 'latest'
warrensbox/terraform-switcher info found version: 1.0.1 for 1.0.1/linux/amd64
warrensbox/terraform-switcher info installed /home/giermulnik/tmp/test_tfswitch_install.sh/tfswitch

> ~/tmp/test_tfswitch_install.sh/tfswitch --version

Version: 1.0.1

> curl -SsL https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash -s -- -b ~/tmp/test_tfswitch_install.sh 0.13.1308
warrensbox/terraform-switcher info checking GitHub for tag '0.13.1308'
warrensbox/terraform-switcher info found version: 0.13.1308 for 0.13.1308/linux/amd64
warrensbox/terraform-switcher info installed /home/giermulnik/tmp/test_tfswitch_install.sh/tfswitch

> ~/tmp/test_tfswitch_install.sh/tfswitch --version

Version: 0.13.1308

As of look of it, this should be all fixed now, inc Homebrew.

> brew upgrade
==> Auto-updating Homebrew...
==> Upgrading 1 outdated package:
warrensbox/tap/tfswitch 0.13.1308 -> 1.0.1
==> Fetching warrensbox/tap/tfswitch
==> Downloading https://github.com/warrensbox/terraform-switcher/releases/download/1.0.1/terraform-s
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/13
############################################################################################# 100.0%
==> Upgrading warrensbox/tap/tfswitch
  0.13.1308 -> 1.0.1
==> Caveats
Type 'tfswitch' on your command line and choose the terraform version that you want from the dropdown. This command currently only works on macOS and Linux
==> Summary
✔  /home/linuxbrew/.linuxbrew/Cellar/tfswitch/1.0.1: 6 files, 10.5MB, built in 1 second
==> Running `brew cleanup tfswitch`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /home/linuxbrew/.linuxbrew/Cellar/tfswitch/0.13.1308... (6 files, 9.8MB)

> tfswitch --version

Version: 1.0.1

@warrensbox Thank you 👍🏻

@arturmartins @MatthewJohn Could you please confirm you’re not having issues with downloading artifacts now?

To test that, the tap will need to be updated with the new path. (Current HEAD is https://github.com/warrensbox/homebrew-tap/commit/0c26995f40807856bc049b4ca27d0402ce4c4c8e)

At the moment, I can’t even untap. I guess I will wait for @warrensbox to update the tap when possible.

Oh, I missed lower vs upper case in platform names since the new automation 🤦🏻 Re-uploaded new checksums file with checksums added for lowercased filenames. install.sh should be good now 🤞🏻

Many Thanks, works on both linux/amd64, linux/arm64 😃

@yermulnik Have updated my use case to confirm - CI running: https://gitlab.dockstudios.co.uk/pub/terrareg/-/pipelines/4769

Many thanks Matt

works on linux/amd64 now, thanks

Fixed and re-uploaded checksums file (manually at this time).