Skip to content

Commit 4c69362

Browse files
authored
Merge pull request #17 from rajatjindal/versions
change canary version format
2 parents 6e37638 + 6f4ce2b commit 4c69362

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)