Skip to content
Merged
Show file tree
Hide file tree
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
47 changes: 0 additions & 47 deletions scripts/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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 = '';

Expand All @@ -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 =
Expand Down Expand Up @@ -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(', ');
Expand All @@ -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 ` +
Expand Down
2 changes: 1 addition & 1 deletion tfjs-backend-wasm/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tfjs-backend-wasm/src/version.ts
Original file line number Diff line number Diff line change
@@ -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};
2 changes: 1 addition & 1 deletion tfjs-converter/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tfjs-converter/src/version.ts
Original file line number Diff line number Diff line change
@@ -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};
2 changes: 1 addition & 1 deletion tfjs-core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/version.ts
Original file line number Diff line number Diff line change
@@ -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};
2 changes: 1 addition & 1 deletion tfjs-data/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tfjs-data/src/version.ts
Original file line number Diff line number Diff line change
@@ -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};
2 changes: 1 addition & 1 deletion tfjs-layers/package.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tfjs-layers/src/version.ts
Original file line number Diff line number Diff line change
@@ -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};
2 changes: 1 addition & 1 deletion tfjs-node-gpu/package.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tfjs-node/package.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tfjs-node/src/version.ts
Original file line number Diff line number Diff line change
@@ -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};
2 changes: 1 addition & 1 deletion tfjs/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tfjs/src/version.ts
Original file line number Diff line number Diff line change
@@ -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};