Skip to content

Commit 6f4ce2b

Browse files
committed
change canary version format
Signed-off-by: Rajat Jindal <[email protected]>
1 parent 6e37638 commit 6f4ce2b

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

dist/index.js

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/release.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,12 @@ function getReleaseTagName(): string {
176176

177177
function getVersion(tagName: string): string {
178178
if (tagName === 'canary') {
179-
const cargoToml = toml.parse(fs.readFileSync('Cargo.toml', 'utf-8'))
180-
return `${cargoToml.package.version}post.${getEpochTime()}`
179+
if (fs.existsSync('Cargo.toml')) {
180+
const cargoToml = toml.parse(fs.readFileSync('Cargo.toml', 'utf-8'))
181+
return `${cargoToml.package.version}post.${getEpochTime()}`
182+
}
183+
184+
return `canary.${getEpochTime()}`
181185
}
182186

183187
return tagName.replace(/^v/, '')

0 commit comments

Comments
 (0)