Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install script version override #162

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

mateiidavid
Copy link
Contributor

The install script (suggested to be used in CI pipelines) supports
version overrides. This is especially useful in environments where tools
and dependencies need to be pinned to a certain version. It seems this
has been accidentally changed by an automated CI process during the
latest release; version overrides no longer work, and instead, only the
most recent release (v1.6.14) can be used.

This change fixes the accidental commit by using the provided program
argument instead of the hardcoded value when an overridden version is
provided to actionlint.

Closes #161

Signed-off-by: Matei David matei@buoyant.io


Tests

  • Behaviour prior to the change:
# 
#  Curl script and execute
# 
:; cd /Downloads

:;  curl -s curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash | bash -s -- 1.6.13 tmp/
Start downloading actionlint v1.6.14 to tmp
Detected OS=linux ext=tar.gz arch=amd64
Downloaded and unarchived executable: tmp/actionlint
Done: 1.6.14
installed by downloading from release page
built with go1.18.3 compiler for linux/amd64

:; cd tmp/

:; ./actionlint --version
1.6.14
installed by downloading from release page
built with go1.18.3 compiler for linux/amd64
  • Behaviour after the change:
:; ./download-actionlint.bash 1.6.13 tmp/
Start downloading actionlint v1.6.13 to tmp
Detected OS=linux ext=tar.gz arch=amd64
Downloaded and unarchived executable: tmp/actionlint
Done: 1.6.13
installed by downloading from release page
built with go1.18.1 compiler for linux/amd64

:; ./actionlint --version
1.6.13
installed by downloading from release page
built with go1.18.1 compiler for linux/amd64

Apologies if the contribution was very straightforward. I'm working on integrating actionlint in our pipeline and would rather use the install script as opposed to just curling the latest binary from the release page. Let me know if anything needs to be changed :)

The install script (suggested to be used in CI pipelines) supports
version overrides. This is especially useful in environments where tools
and dependencies need to be pinned to a certain version. It seems this
has been accidentally changed by an automated CI process during the
latest release; version overrides no longer work, and instead, only the
most recent release (`v1.6.14`) can be used.

This change fixes the accidental commit by using the provided program
argument instead of the hardcoded value when an overridden version is
provided to `actionlint`.

Closes rhysd#161

Signed-off-by: Matei David <matei@buoyant.io>
@rhysd
Copy link
Owner

rhysd commented Jun 27, 2022

Nice catch! This was caused by a bug of CI release workflow.

c18a3b0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install script doesn't allow version override
2 participants