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

Changed the documentation to specify v before 'version' and code changes to append 'v' if it not provided in version #11

Merged
merged 4 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Acceptable values are latest or any semantic version string like 1.15.0. Use thi
```yaml
- uses: azure/setup-helm@v1
with:
version: '<version>' # default is latest stable
version: v'<version>' # default is latest stable
rgsubh marked this conversation as resolved.
Show resolved Hide resolved
id: install
```

Expand Down
3 changes: 3 additions & 0 deletions lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ function run() {
if (version.toLocaleLowerCase() === 'latest') {
version = yield getStableHelmVersion();
}
else if (!version.toLocaleLowerCase().startsWith('v')) {
version = 'v' + version;
}
let cachedPath = yield downloadHelm(version);
try {
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {
Expand Down
2 changes: 2 additions & 0 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ async function run() {
let version = core.getInput('version', { 'required': true });
if (version.toLocaleLowerCase() === 'latest') {
version = await getStableHelmVersion();
}else if(!version.toLocaleLowerCase().startsWith('v')){
rgsubh marked this conversation as resolved.
Show resolved Hide resolved
version = 'v' + version;
}

let cachedPath = await downloadHelm(version);
Expand Down