Skip to content

Commit

Permalink
Merge pull request #528 from phovea/release-12.0.0-latest
Browse files Browse the repository at this point in the history
Release 12.0.0
  • Loading branch information
Anita Steiner authored Sep 9, 2022
2 parents 043e187 + dc56989 commit 26ecc30
Show file tree
Hide file tree
Showing 38 changed files with 884 additions and 883 deletions.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

* [x] Create new `release-x.x.x` branch (based on `develop` branch)
* [ ] Collect changes and write [release notes](#release-notes)
* [ ] Draft release PR in GitHub that merges the `release-x.x.x` into the `master` branch
* [ ] Draft release PR in GitHub that merges the `release-x.x.x` into the `main` branch

### Update version

Expand All @@ -18,7 +18,7 @@
* [ ] Commit and push *package.json* and *package-lock.json* with new version number
* [ ] Wait until build is successful
* [ ] Assign reviewer and wait for final review
* [ ] Merge this pull request into master branch
* [ ] Merge this pull request into main branch

### Publish npm release

Expand All @@ -35,7 +35,7 @@

### Prepeare next develop release

* [ ] Merge `master` into `develop` branch
* [ ] Merge `main` into `develop` branch
* [ ] Update version in *package.json* and *package-lock.json* to `<next patch version>-SNAPSHOT` (e.g., `2.3.1` to `2.3.2-SNAPSHOT`)
* [ ] Commit and push changes

Expand Down
6 changes: 1 addition & 5 deletions generators/_init-hybrid/templates/package.tmpl.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"src",
"phovea_registry.js",
"dist"
],
"files": ["src", "dist"],
"scripts": {
"build": "npm run clean && npm run compile",
"clean": "rimraf build dist lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

* [x] Create new `release-x.x.x` branch (based on `develop` branch)
* [ ] Collect changes and write [release notes](#release-notes)
* [ ] Draft release PR in GitHub that merges the `release-x.x.x` into the `master` branch
* [ ] Draft release PR in GitHub that merges the `release-x.x.x` into the `main` branch

### Release dependencies first

Expand All @@ -29,7 +29,7 @@ In case of dependent Phovea/TDP repositories follow [dependency tree](https://wi
* [ ] Update this version number following [semver](https://semver.org)
* [ ] Commit and push *package.json* with new version number
* [ ] Assign reviewer and wait for final review
* [ ] Merge this pull request into master branch
* [ ] Merge this pull request into main branch
* [ ] Add release label (i.e., `release: major`, `release: minor`, or `release: patch`)

### Publish pip release
Expand Down Expand Up @@ -72,7 +72,7 @@ The steps of this section are only necessary if the code is public and should be
### Prepeare next develop release

* [ ] Switch to `develop` branch
* [ ] Merge `master` branch into `develop` (`git merge origin/master`)
* [ ] Merge `main` branch into `develop` (`git merge origin/main`)
* [ ] Update version in *package.json* to `<next patch version>-SNAPSHOT` (e.g., `2.3.1` to `2.3.2-SNAPSHOT`)
* [ ] Revert dependencies in *package.json* to develop branches (e.g., `"tdp_core": "git+ssh://[email protected]:datavisyn/tdp_core#develop"`)
* [ ] Revert dependencies in *requirements.txt* to develop branches (e.g., `git+https://github.com/datavisyn/tdp_core.git@develop#egg=tdp_core`)
Expand Down
4 changes: 2 additions & 2 deletions generators/_init-python/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ class Generator extends BasePhoveaGenerator {
// and the incoming format is tdp_core>=5.0.1,<6.0.0
if (!useDevelopDependencies) {
const devRequirement = Object.keys(p.develop.requirements)[0];
const masterRequirment = Object.keys(p.requirements)[0];
requirements = _.omit(requirements, [devRequirement, masterRequirment]);
const mainRequirment = Object.keys(p.requirements)[0];
requirements = _.omit(requirements, [devRequirement, mainRequirment]);
}

_.assign(requirements, (useDevelopDependencies ? p.develop : p).requirements);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

* [x] Create new `release-x.x.x` branch (based on `develop` branch)
* [ ] Collect changes and write [release notes](#release-notes)
* [ ] Draft release PR in GitHub that merges the `release-x.x.x` into the `master` branch
* [ ] Draft release PR in GitHub that merges the `release-x.x.x` into the `main` branch

### Release dependencies first

Expand All @@ -29,7 +29,7 @@ In case of dependent Phovea/TDP repositories follow [dependency tree](https://wi
* [ ] Update this version number following [semver](https://semver.org)
* [ ] Commit and push *package.json* with new version number
* [ ] Assign reviewer and wait for final review
* [ ] Merge this pull request into master branch
* [ ] Merge this pull request into main branch
* [ ] Add release label (i.e., `release: major`, `release: minor`, or `release: patch`)

### Publish pip release
Expand Down Expand Up @@ -58,7 +58,7 @@ The steps of this section are only necessary if the code is public and should be
### Prepeare next develop release

* [ ] Switch to `develop` branch
* [ ] Merge `master` branch into `develop` (`git merge origin/master`)
* [ ] Merge `main` branch into `develop` (`git merge origin/main`)
* [ ] Update version in *package.json* to `<next patch version>-SNAPSHOT` (e.g., `2.3.1` to `2.3.2-SNAPSHOT`)
* [ ] Revert dependencies in *requirements.txt* to develop branches (e.g., `git+https://github.com/datavisyn/tdp_core.git@develop#egg=tdp_core`)
* [ ] Commit and push changes
Expand Down
2 changes: 1 addition & 1 deletion generators/_init-web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Generator extends BasePhoveaGenerator {

install() {
if (this.options.options.install) {
SpawnUtils.spawnSync('npm', 'install', this.cwd, true);
SpawnUtils.spawnSync('yarn', 'install', this.cwd, true);
}
}

Expand Down
7 changes: 1 addition & 6 deletions generators/_init-web/templates/package.tmpl.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"src",
"phovea_registry.js",
"dist"
],
"files": ["src", "dist"],
"engines": {
"npm": ">= 6.12",
"node": ">= 14.19"
Expand All @@ -27,7 +23,6 @@
"release:major": "npm version major && npm publish && git push --follow-tags",
"release:minor": "npm version minor && npm publish && git push --follow-tags",
"release:patch": "npm version patch && npm publish && git push --follow-tags"

},
"devDependencies": {
"@types/jest": "~27.4.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

* [x] Create new `release-x.x.x` branch (based on `develop` branch)
* [ ] Collect changes and write [release notes](#release-notes)
* [ ] Draft release PR in GitHub that merges the `release-x.x.x` into the `master` branch
* [ ] Draft release PR in GitHub that merges the `release-x.x.x` into the `main` branch

### Release dependencies first

Expand All @@ -28,7 +28,7 @@ In case of dependent Phovea/TDP repositories follow [dependency tree](https://wi
* [ ] Update this version number following [semver](https://semver.org)
* [ ] Commit and push *package.json* with new version number
* [ ] Assign reviewer and wait for final review
* [ ] Merge this pull request into master branch
* [ ] Merge this pull request into main branch
* [ ] Add release label (i.e., `release: major`, `release: minor`, or `release: patch`)

### Publish npm release
Expand All @@ -55,7 +55,7 @@ The steps of this section are only necessary if the code is public and should be
### Prepeare next develop release

* [ ] Switch to `develop` branch
* [ ] Merge `master` branch into `develop` (`git merge origin/master`)
* [ ] Merge `main` branch into `develop` (`git merge origin/main`)
* [ ] Update version in *package.json* to `<next patch version>-SNAPSHOT` (e.g., `2.3.1` to `2.3.2-SNAPSHOT`)
* [ ] Revert dependencies in *package.json* to develop branches (e.g., `"tdp_core": "git+ssh://[email protected]:datavisyn/tdp_core#develop"`)
* [ ] Commit and push changes
Expand Down
2 changes: 1 addition & 1 deletion generators/_init-web/templates/plain/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (pluginsToTransform.length > 0) {
}

/**
* TODO check if we can process inline webpack loaders (e.g. as found in https://github.com/datavisyn/tdp_core/blob/master/src/_bootstrap.ts)
* TODO check if we can process inline webpack loaders (e.g. as found in https://github.com/datavisyn/tdp_core/blob/main/src/_bootstrap.ts)
* see also https://jestjs.io/docs/en/webpack#mocking-css-modules
*/
module.exports = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* Licensed under the new BSD license, available at http://caleydo.org/license
**************************************************************************** */

import {PluginRegistry} from '<%- name==="tdp_core" ? "./dist/app/PluginRegistry" : "tdp_core" %>';
import reg from './dist/phovea';
import {PluginRegistry} from '<%- name==="tdp_core" ? "./app/PluginRegistry" : "tdp_core" %>';
import reg from './phovea';

/**
* build a registry by registering all phovea modules
*/

// other modules
<% - modules.filter(isWeb).map((d) => `import '${d}/phovea_registry.js';`).join('\n') %>
<% - modules.filter(isWeb).map((d) => `import '${d}/dist/phovea_registry';`).join('\n') %>

// self
PluginRegistry.getInstance().register('<%-name%>', reg);
2 changes: 1 addition & 1 deletion generators/_node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const originUrl = require('git-remote-origin-url');
const fs = require('fs-extra');
const BasePhoveaGenerator = require('../../base/BasePhoveaGenerator');

// based on https://github.com/yeoman/generator-node/blob/master/generators/app/index.js
// based on https://github.com/yeoman/generator-node/blob/main/generators/app/index.js

class PackageJSONGenerator extends BasePhoveaGenerator {

Expand Down
2 changes: 1 addition & 1 deletion generators/clone-repo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Generator extends Base {
// Correct version: `-b '^^^^v2.0.0'`
this.option('branch', {
alias: 'b',
defaults: 'master',
defaults: 'main',
required: false,
type: String
});
Expand Down
8 changes: 4 additions & 4 deletions generators/init-product/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class Generator extends BasePhoveaGenerator {
validate: isRequired
}, {
name: 'branch',
message: 'repository branch (master) or tag (tags/v1.0.0): ',
default: 'master',
message: 'repository branch (main) or tag (tags/v1.0.0): ',
default: 'main',
validate: isRequired
}, {
name: 'custom',
Expand Down Expand Up @@ -76,8 +76,8 @@ class Generator extends BasePhoveaGenerator {
validate: isRequired
}, {
name: 'branch',
message: 'primary repository branch (master) or tag (tags/v1.0.0): ',
default: 'master',
message: 'primary repository branch (main) or tag (tags/v1.0.0): ',
default: 'main',
validate: isRequired
}, {
name: 'additional',
Expand Down
4 changes: 2 additions & 2 deletions generators/init-product/templates/plain/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
name: Build and deploy
command: |
case "${CIRCLE_BRANCH}${CIRCLE_TAG}" in
master)
main)
awsTag="latest"
;;
*)
Expand Down Expand Up @@ -104,4 +104,4 @@ workflows:
branches:
ignore: /.*/
tags:
only: /^v.*/
only: /^v.*/
2 changes: 1 addition & 1 deletion generators/init-product/templates/plain/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ function cloneRepo(p, cwd) {
// either of them has to be defined
p.name = p.name || fromRepoUrl(p.repo);
p.repo = p.repo || `phovea/${p.name}`;
p.branch = p.branch || 'master';
p.branch = p.branch || 'main';

return yo('clone-repo', {
branch: p.branch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
"$id": "phovea_product/items/properties/branch",
"type": "string",
"title": "the branch, tag, or sha1 commit to use",
"default": "master",
"default": "main",
"examples": [
"master",
"main",
"v1.2.3",
"dc7486a472a987a2f6a38cd18b9b069487f1a4c8",
"develop"
Expand Down Expand Up @@ -119,9 +119,9 @@
"$id": "phovea_product/items/properties/additional/items/properties/branch",
"type": "string",
"title": "the branch, tag, or sha1 commit to use",
"default": "master",
"default": "main",
"examples": [
"master",
"main",
"v1.2.3",
"dc7486a472a987a2f6a38cd18b9b069487f1a4c8",
"develop"
Expand Down
6 changes: 3 additions & 3 deletions generators/install/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Generator extends Base {
// regular dependency
this.before = this.fs.readJSON(this.destinationPath('../package.json'));
this.log('installing: ', this.pkgs.join(' '));
this.npmInstall(this.pkgs, {
this.yarnInstall(this.pkgs, {
save: true
});
return;
Expand All @@ -82,8 +82,8 @@ class Generator extends Base {
}).filter((n) => Boolean(n));
this.log('updating workspace');
return GeneratorUtils.yo('workspace').then(() => {
this.log('running npm install');
this.npmInstall();
this.log('running yarn install');
this.yarnInstall();
});
}

Expand Down
4 changes: 2 additions & 2 deletions generators/prepare-release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,10 @@ class Generator extends Base {
.then(this._createPullRequest.bind(this))
.then(this._waitForConfirmation.bind(this, 'Merged the pull request?'))
.then(this._fetch.bind(this))
.then(this._checkoutBranch.bind(this, '-t origin/master'))
.then(this._checkoutBranch.bind(this, '-t origin/main'))
.then(this._tag.bind(this))
.then(this._checkoutBranch.bind(this, this.options.branch))
.then(this._merge.bind(this, 'origin/master'))
.then(this._merge.bind(this, 'origin/main'))
.then(this._preareNextDevPackage.bind(this))
.then(this._pushBranch.bind(this, this.options.branch, true))
.then(this._openReleasePage.bind(this))
Expand Down
8 changes: 4 additions & 4 deletions generators/setup-workspace/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Generator extends Base {

this.option('branch', {
alias: 'b',
defaults: 'master',
defaults: 'main',
type: String
});

Expand Down Expand Up @@ -122,7 +122,7 @@ class Generator extends Base {
* @returns The parsed phovea_product.json file.
*/
_getProduct() {
return WorkspaceUtils.cloneRepo(this.productName, this.options.branch || 'master', null, '.', this.cwd, this.cloneSSH)
return WorkspaceUtils.cloneRepo(this.productName, this.options.branch || 'main', null, '.', this.cwd, this.cloneSSH)
.then(() => {
this._removeUnnecessaryProductFiles();
const phoveaProductJSON = `${this.cwd}/phovea_product.json`;
Expand Down Expand Up @@ -289,7 +289,7 @@ class Generator extends Base {
.then(() => GeneratorUtils.yo('workspace', {defaultApp: this.defaultApp, skipNextStepsLog: true}, null, this.cwd, this.env.adapter))
.then(this._customizeWorkspace.bind(this))
.then(this._downloadDataFiles.bind(this))
.then(() => this.options.skip.includes('install') ? null : SpawnUtils.spawnOrAbort('npm', 'install', this.cwd, true))
.then(() => this.options.skip.includes('install') ? null : SpawnUtils.spawnOrAbort('yarn', 'install', this.cwd, true))
.then(this._downloadBackupFiles.bind(this))
.then(this._buildDockerCompose.bind(this))
.catch((msg) => {
Expand All @@ -315,7 +315,7 @@ class Generator extends Base {
this.log(chalk.green((stepCounter++) + '. Switch to the created directory: '), chalk.yellow(`cd ${this.cwd}`));

if (this.options.skip.includes('install')) {
this.log(chalk.green((stepCounter++) + '. Install npm dependencies: '), chalk.yellow('npm install'));
this.log(chalk.green((stepCounter++) + '. Install dependencies: '), chalk.yellow('yarn install'));
}

if (this.options.skip.includes('build')) {
Expand Down
Loading

0 comments on commit 26ecc30

Please sign in to comment.