Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions publish_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,18 @@ async function nextVersion(currentVersion) {
console.log(`${currentVersion} => ${bumpedPatch}? ${ACCEPT_HINT}`);
console.log(`${currentVersion} => ${bumpedMinor}? (m)`);
var answer = await question(`${currentVersion} => ${bumpedMajor}? (M)\n`);
var finalVersion = bumpedPatch;
if(ok(answer)) {
return bumpedPatch;
} else if(answer == "m") {
return bumpedMinor;
finalVersion = bumpedMinor;
} else if(answer == "M") {
return bumpedMajor;
finalVersion = bumpedMajor;
} else {
console.log("Publishing script aborted.");
throw ABORTED;
}
console.log(`You chose version ${finalVersion}`);
return finalVersion;
}

async function getLastPreparedTag() {
Expand Down Expand Up @@ -330,7 +332,7 @@ async function Main() {
var useNewVersion = false;
if(await isNewer(packageObj, mostRecentDafnyRelease)) {
if (ok(await question(`There is a new Dafny version available: (${mostRecentDafnyRelease}). Do you want to update it? ${ACCEPT_HINT}`))) {
// We keep that number
console.log(`Updating latest version of Dafny to ${mostRecentDafnyRelease}`);
} else {
console.log("Ignoring new Dafny version.");
mostRecentDafnyRelease = undefined;
Expand Down