Skip to content

Commit

Permalink
Allow go version to be inferred from provider version (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrbradley authored Jun 18, 2024
1 parent d59dde4 commit a273cd2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,3 @@ jobs:
directory: __tests__/programs/random-go
provider: random
providerVersion: '4.16.2'
packageVersion: 'v4.16.2'
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export async function run(): Promise<void> {
const providerVersion: string = core.getInput('providerVersion')
let packageVersion: string = core.getInput('packageVersion')
if (packageVersion === '') {
packageVersion = providerVersion
if (runtime === 'go') {
packageVersion = `v${providerVersion}`
} else {
packageVersion = providerVersion
}
}
const publisher: string = core.getInput('publisher')
const goModuleTemplate: string = core.getInput('goModuleTemplate')
Expand Down

0 comments on commit a273cd2

Please sign in to comment.