console.log('Backing up the original package.json');
backupOriginalPackageJson();
console.log('Creating the nightly version of package.json');
createNightlyVersionInPackageJson();
console.log('Publishing to npm');
publishToNpm();
console.log('Restoring original package.json');
revertPackageJson();
console.log('Building Nightly ... DONE');
}
catch(ex){
console.log(`Something went wrong with publishing the nightly. This process modifies the package.json, so restore it before committing code! - ${ex.message}`);