Skip to content

Commit a43eb8b

Browse files
committed
remove prefix from version
Signed-off-by: Rajat Jindal <[email protected]>
1 parent 25af64c commit a43eb8b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

dist/index.js

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/release.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as tc from '@actions/tool-cache'
88
import {Buffer} from 'buffer'
99
import {Octokit} from '@octokit/rest'
1010
import toml from 'toml'
11+
1112
const RELEASE_BOT_WEBHOOK_URL = 'https://spin-plugin-releaser.fermyon.app'
1213

1314
interface MustacheView {
@@ -49,7 +50,6 @@ async function run(): Promise<void> {
4950
repo: github.context.repo.repo
5051
})
5152

52-
core.info(JSON.stringify(allReleases))
5353
const release = allReleases.data.find(item => item.tag_name === tagName)
5454
if (!release) {
5555
throw new Error(`no release found with tag ${tagName}`)
@@ -173,11 +173,10 @@ function getReleaseTagName(): string {
173173
function getVersion(tagName: string): string {
174174
if (tagName === 'canary') {
175175
const cargoToml = toml.parse(fs.readFileSync('Cargo.toml', 'utf-8'))
176-
core.info(`${cargoToml.package.version}post.${getEpochTime()}`)
177176
return `${cargoToml.package.version}post.${getEpochTime()}`
178177
}
179178

180-
return tagName
179+
return tagName.replace(/^v/, '')
181180
}
182181

183182
function getEpochTime(): number {

0 commit comments

Comments
 (0)