Skip to content

Commit

Permalink
Merge pull request #2 from humanitec/new-url
Browse files Browse the repository at this point in the history
feat: support new download url
  • Loading branch information
johanneswuerbach authored Dec 18, 2023
2 parents da48a38 + 3c07757 commit b893145
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Test Local Action
uses: ./
with:
version: '0.11.0'
version: '0.12.0'

- name: Ensure humctl is installed
run: humctl version
7 changes: 6 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ function getDownloadUrl(version: string): string {

const extension = platform === 'windows' ? 'zip' : 'tar.gz'

return `https://storage.googleapis.com/humctl-releases/v${version}/cli_${version}_${platform}_${arch}.${extension}`
if (version === '0.11.0') {
return `https://storage.googleapis.com/humctl-releases/v${version}/cli_${version}_${platform}_${arch}.${extension}`
} else {
return `https://github.com/humanitec/cli/releases/download/v${version}/cli_${version}_${platform}_${arch}.${extension}`
}
}

/**
Expand Down

0 comments on commit b893145

Please sign in to comment.