Skip to content

Commit

Permalink
chore: patches for pre
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Apr 19, 2022
1 parent 81d70e0 commit 5f7f665
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ async function run() {
}

let prerelease = semver.prerelease(taggedVersion);
let prereleaseTag = prerelease ? prerelease[0] : undefined;
let prereleaseTag =
prerelease && prerelease.length > 0 ? String(prerelease[0]) : undefined;
let tag = prereleaseTag
? prereleaseTag.includes("nightly")
? "nightly"
: prereleaseTag
: taggedVersion === "experimental-netlify-edge"
? "experimental-netlify-edge"
: "latest";

// Publish eslint config directly from the package directory
Expand Down
6 changes: 5 additions & 1 deletion scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@ async function incrementRemixVersion(nextVersion) {

// Commit and tag
execSync(`git commit --all --message="Version ${nextVersion}"`);
execSync(`git tag -a -m "Version ${nextVersion}" v${nextVersion}`);
execSync(
`git tag -a -m "Version ${nextVersion}" ${
/^\d/.test(nextVersion.charAt(0)) ? "v" + nextVersion : nextVersion
}`
);
console.log(chalk.green(` Committed and tagged version ${nextVersion}`));
}

Expand Down

0 comments on commit 5f7f665

Please sign in to comment.