From 126b1c7589d83754c8c8a9173f500a7ebff894df Mon Sep 17 00:00:00 2001 From: Na Li Date: Tue, 24 Mar 2020 10:23:41 -0700 Subject: [PATCH] Remove master branch version update. --- scripts/release.ts | 47 -------------------------------- tfjs-backend-wasm/package.json | 2 +- tfjs-backend-wasm/src/version.ts | 2 +- tfjs-converter/package.json | 2 +- tfjs-converter/src/version.ts | 2 +- tfjs-core/package.json | 2 +- tfjs-core/src/version.ts | 2 +- tfjs-data/package.json | 2 +- tfjs-data/src/version.ts | 2 +- tfjs-layers/package.json | 2 +- tfjs-layers/src/version.ts | 2 +- tfjs-node-gpu/package.json | 2 +- tfjs-node/package.json | 2 +- tfjs-node/src/version.ts | 2 +- tfjs/package.json | 2 +- tfjs/src/version.ts | 2 +- 16 files changed, 15 insertions(+), 62 deletions(-) diff --git a/scripts/release.ts b/scripts/release.ts index e5df0ef2796..9c747d7b907 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -30,7 +30,6 @@ import * as argparse from 'argparse'; import chalk from 'chalk'; import * as fs from 'fs'; import * as mkdirp from 'mkdirp'; -import * as readline from 'readline'; import * as shell from 'shelljs'; import {RELEASE_UNITS, Phase, $, question, printReleaseUnit, printPhase} from './release-util'; @@ -98,15 +97,6 @@ async function main() { $(`rm -f -r ${dir}`); $(`mkdir ${dir}`); - const dirMaster = `${TMP_DIR}/${publishTFJS(repo) ? `tfjs_master` : repo}`; - - // Only generate a second folder for master branch if publish tfjs. - if (publishTFJS(repo)) { - $(`rm -f -r ${dirMaster}/*`); - $(`rm -f -r ${dirMaster}`); - $(`mkdir ${dirMaster}`); - } - const urlBase = args.git_protocol ? 'git@github.com:' : 'https://github.com/'; let releaseBranch = ''; @@ -116,11 +106,6 @@ async function main() { shell.cd(dir); } else { // Publishing packages in tfjs. - // For monorepo, need to update both release branch and master branch. - // Master branch will have a simpler update, just bump version and - // update version.ts. Release branch also have to update dependencies. - $(`git clone -b master ${urlBase}tensorflow/tfjs ${dirMaster} --depth=1`); - if (phaseInt !== 0) { // Phase0 should be published and release branch should have been created. const latestVersion = @@ -239,20 +224,6 @@ async function main() { $(`./scripts/make-version.js ${packageName}`); } newVersions.push(newVersion); - - // For master branch, only update package.json version. - if (publishTFJS(repo)) { - shell.cd(dirMaster); - - const packageJsonPathMaster = `${dirMaster}/${packageName}/package.json`; - fs.writeFileSync(packageJsonPathMaster, pkg); - - if (!phase.leaveVersion) { - $(`./scripts/make-version.js ${packageName}`); - } - - shell.cd(dir); - } } const packageNames = packages.join(', '); @@ -271,24 +242,6 @@ async function main() { $(`hub pull-request -b ${releaseBranch} -m "${title}" -l INTERNAL -o`); console.log(); - if (publishTFJS(repo)) { - console.log(chalk.magenta.bold( - '~~~ Creating PR to update master branch ~~~')); - console.log(chalk.blue(`You should NOT merge this PR before the PR for - release branch is merged.`)); - const branchNameMaster = `${branchName}_master`; - shell.cd(dirMaster); - $(`git checkout -b ${branchNameMaster}`); - $(`git push -u origin ${branchNameMaster}`); - $(`git add .`); - $(`git commit -a -m "Update ${packageNames} to ${versionNames}."`); - $(`git push`); - const title = - phase.title ? phase.title : `Update ${packageNames} to ${versionNames}.`; - $(`hub pull-request -m "${title}" -l INTERNAL -o`); - console.log(); - } - console.log( `Done. FYI, this script does not publish to NPM. ` + `Please publish by running yarn publish-npm ` + diff --git a/tfjs-backend-wasm/package.json b/tfjs-backend-wasm/package.json index 47ceedd1ec2..d36a8eaa6b4 100644 --- a/tfjs-backend-wasm/package.json +++ b/tfjs-backend-wasm/package.json @@ -1,6 +1,6 @@ { "name": "@tensorflow/tfjs-backend-wasm", - "version": "1.7.0", + "version": "0.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "jsnext:main": "dist/tf-backend-wasm.esm.js", diff --git a/tfjs-backend-wasm/src/version.ts b/tfjs-backend-wasm/src/version.ts index b264c998a64..5fa574e7da4 100644 --- a/tfjs-backend-wasm/src/version.ts +++ b/tfjs-backend-wasm/src/version.ts @@ -1,5 +1,5 @@ /** @license See the LICENSE file. */ // This code is auto-generated, do not modify this file! -const version = '1.7.0'; +const version = '0.0.0'; export {version}; diff --git a/tfjs-converter/package.json b/tfjs-converter/package.json index e45ed7dc2a6..0ec81daeec7 100644 --- a/tfjs-converter/package.json +++ b/tfjs-converter/package.json @@ -1,6 +1,6 @@ { "name": "@tensorflow/tfjs-converter", - "version": "1.7.0", + "version": "0.0.0", "description": "Tensorflow model converter for javascript", "main": "dist/index.js", "jsnext:main": "dist/tf-converter.esm.js", diff --git a/tfjs-converter/src/version.ts b/tfjs-converter/src/version.ts index b264c998a64..5fa574e7da4 100644 --- a/tfjs-converter/src/version.ts +++ b/tfjs-converter/src/version.ts @@ -1,5 +1,5 @@ /** @license See the LICENSE file. */ // This code is auto-generated, do not modify this file! -const version = '1.7.0'; +const version = '0.0.0'; export {version}; diff --git a/tfjs-core/package.json b/tfjs-core/package.json index 47ab4cb7ae5..8b5c83b2b8b 100644 --- a/tfjs-core/package.json +++ b/tfjs-core/package.json @@ -1,6 +1,6 @@ { "name": "@tensorflow/tfjs-core", - "version": "1.7.0", + "version": "0.0.0", "description": "Hardware-accelerated JavaScript library for machine intelligence", "private": false, "main": "dist/index.js", diff --git a/tfjs-core/src/version.ts b/tfjs-core/src/version.ts index b264c998a64..5fa574e7da4 100644 --- a/tfjs-core/src/version.ts +++ b/tfjs-core/src/version.ts @@ -1,5 +1,5 @@ /** @license See the LICENSE file. */ // This code is auto-generated, do not modify this file! -const version = '1.7.0'; +const version = '0.0.0'; export {version}; diff --git a/tfjs-data/package.json b/tfjs-data/package.json index 3a49774162e..9ce9bd17dce 100644 --- a/tfjs-data/package.json +++ b/tfjs-data/package.json @@ -1,6 +1,6 @@ { "name": "@tensorflow/tfjs-data", - "version": "1.7.0", + "version": "0.0.0", "description": "TensorFlow Data API in JavaScript", "private": false, "main": "dist/index.js", diff --git a/tfjs-data/src/version.ts b/tfjs-data/src/version.ts index b264c998a64..5fa574e7da4 100644 --- a/tfjs-data/src/version.ts +++ b/tfjs-data/src/version.ts @@ -1,5 +1,5 @@ /** @license See the LICENSE file. */ // This code is auto-generated, do not modify this file! -const version = '1.7.0'; +const version = '0.0.0'; export {version}; diff --git a/tfjs-layers/package.json b/tfjs-layers/package.json index debba317e46..2e916b0d95c 100644 --- a/tfjs-layers/package.json +++ b/tfjs-layers/package.json @@ -1,6 +1,6 @@ { "name": "@tensorflow/tfjs-layers", - "version": "1.7.0", + "version": "0.0.0", "description": "TensorFlow layers API in JavaScript", "license": "Apache-2.0 AND MIT", "private": false, diff --git a/tfjs-layers/src/version.ts b/tfjs-layers/src/version.ts index b264c998a64..5fa574e7da4 100644 --- a/tfjs-layers/src/version.ts +++ b/tfjs-layers/src/version.ts @@ -1,5 +1,5 @@ /** @license See the LICENSE file. */ // This code is auto-generated, do not modify this file! -const version = '1.7.0'; +const version = '0.0.0'; export {version}; diff --git a/tfjs-node-gpu/package.json b/tfjs-node-gpu/package.json index 1b500d5a4fa..00ce30945b4 100644 --- a/tfjs-node-gpu/package.json +++ b/tfjs-node-gpu/package.json @@ -1,6 +1,6 @@ { "name": "@tensorflow/tfjs-node-gpu", - "version": "1.7.0", + "version": "0.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "gypfile": true, diff --git a/tfjs-node/package.json b/tfjs-node/package.json index 302b6be018e..555241ed621 100644 --- a/tfjs-node/package.json +++ b/tfjs-node/package.json @@ -1,6 +1,6 @@ { "name": "@tensorflow/tfjs-node", - "version": "1.7.0", + "version": "0.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "gypfile": true, diff --git a/tfjs-node/src/version.ts b/tfjs-node/src/version.ts index b264c998a64..5fa574e7da4 100644 --- a/tfjs-node/src/version.ts +++ b/tfjs-node/src/version.ts @@ -1,5 +1,5 @@ /** @license See the LICENSE file. */ // This code is auto-generated, do not modify this file! -const version = '1.7.0'; +const version = '0.0.0'; export {version}; diff --git a/tfjs/package.json b/tfjs/package.json index 9c67b8f62a7..345b97f8b9d 100644 --- a/tfjs/package.json +++ b/tfjs/package.json @@ -1,6 +1,6 @@ { "name": "@tensorflow/tfjs", - "version": "1.7.0", + "version": "0.0.0", "description": "An open-source machine learning framework.", "private": false, "main": "dist/index", diff --git a/tfjs/src/version.ts b/tfjs/src/version.ts index b264c998a64..5fa574e7da4 100644 --- a/tfjs/src/version.ts +++ b/tfjs/src/version.ts @@ -1,5 +1,5 @@ /** @license See the LICENSE file. */ // This code is auto-generated, do not modify this file! -const version = '1.7.0'; +const version = '0.0.0'; export {version};