Skip to content

Commit 98b8d3a

Browse files
authored
Changed the documentation to specify v before 'version' and code changes to append 'v' if it not provided in version (#11)
* Chnaged the documentation to sepcify v before 'version' * append v to version incase it does not already include * review comments fix
1 parent 38fc288 commit 98b8d3a

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Setup Helm
22
#### Install a specific version of helm binary on the runner.
33

4-
Acceptable values are latest or any semantic version string like 1.15.0. Use this action in workflow to define which version of helm will be used.
4+
Acceptable values are latest or any semantic version string like v2.16.7 Use this action in workflow to define which version of helm will be used.
55

66
```yaml
77
- uses: azure/setup-helm@v1

lib/run.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ function run() {
130130
if (version.toLocaleLowerCase() === 'latest') {
131131
version = yield getStableHelmVersion();
132132
}
133+
else if (!version.toLocaleLowerCase().startsWith('v')) {
134+
version = 'v' + version;
135+
}
133136
let cachedPath = yield downloadHelm(version);
134137
try {
135138
if (!process.env['PATH'].startsWith(path.dirname(cachedPath))) {

src/run.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ async function run() {
119119
let version = core.getInput('version', { 'required': true });
120120
if (version.toLocaleLowerCase() === 'latest') {
121121
version = await getStableHelmVersion();
122+
} else if (!version.toLocaleLowerCase().startsWith('v')) {
123+
version = 'v' + version;
122124
}
123125

124126
let cachedPath = await downloadHelm(version);

0 commit comments

Comments
 (0)