mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(release): update release task to increment version, run validate, and pull latest
update the release documentation to reflect the new release process
This commit is contained in:
@ -20,14 +20,14 @@ Run `gulp build` or `gulp watch` to watch for changes.
|
|||||||
|
|
||||||
### Building & Running e2e Tests
|
### Building & Running e2e Tests
|
||||||
|
|
||||||
1. Run `gulp e2e` or `gulp watch.e2e` to watch for changes.
|
1. Run `gulp e2e` or `gulp e2e.watch` with a folder passed to watch for changes.
|
||||||
2. Navigate to `http://localhost:8000/dist/e2e`
|
2. Navigate to `http://localhost:8080/dist/e2e`
|
||||||
|
|
||||||
|
|
||||||
### Building & Running API Demos
|
### Building & Running API Demos
|
||||||
|
|
||||||
1. Run `gulp demos` or `gulp watch.demos` to watch for changes.
|
1. Run `gulp demos` or `gulp demos.watch` with a folder passed to watch for changes.
|
||||||
2. Navigate to `http://localhost:8000/dist/demos`
|
2. Navigate to `http://localhost:80808080/dist/demos`
|
||||||
|
|
||||||
|
|
||||||
### Building API Docs
|
### Building API Docs
|
||||||
@ -62,39 +62,50 @@ To remove the linked version of `ionic-angular` do `npm rm ionic-angular`, and t
|
|||||||
|
|
||||||
### Running Tests
|
### Running Tests
|
||||||
|
|
||||||
1. `gulp karma`
|
1. `gulp validate`
|
||||||
|
|
||||||
|
|
||||||
### Running Sass Linter
|
### Running Sass Linter
|
||||||
|
|
||||||
1. See the [Sass Guidelines](https://github.com/driftyco/ionic/blob/master/CONTRIBUTING.md#sass-guidelines) for editing Sass and running the linter.
|
**Requires Ruby. Skip this step entirely if you are unable to install Ruby.**
|
||||||
|
|
||||||
|
1. See the [Sass Guidelines](https://github.com/driftyco/ionic/blob/master/.github/CONTRIBUTING.md#sass-changes) for editing the Sass.
|
||||||
|
2. Install the linter: `gem install scss_lint`
|
||||||
|
3. Run `gulp lint.sass` and fix any linter errors.
|
||||||
|
|
||||||
|
|
||||||
|
### Running TypeScript Linter
|
||||||
|
|
||||||
|
1. Run `gulp lint.ts` and fix any errors.
|
||||||
|
|
||||||
|
|
||||||
# Releasing
|
# Releasing
|
||||||
|
|
||||||
### Releasing Ionic Source
|
### Releasing Ionic Source
|
||||||
|
|
||||||
1. Run `gulp prerelease`
|
1. Run [snapshot](#running-snapshot) & verify all changes are intentional, update master snapshot if so
|
||||||
- Pulls latest
|
2. Run `gulp release`
|
||||||
- updates package.json minor version
|
- Pulls latest from GitHub
|
||||||
- updates changelog
|
- Runs `gulp validate`
|
||||||
- builds npm package files into dist
|
- Builds npm package files into dist
|
||||||
|
- Updates package.json version
|
||||||
2. Verify that changelog changes and package.json update are correct (`git status` && `git diff`)
|
- Removes debug statements
|
||||||
3. Run [snapshot](#running-snapshot) & update if necessary
|
- Updates changelog
|
||||||
4. Commit and push
|
- Publishes to npm
|
||||||
5. Run `gulp release`
|
|
||||||
- publishes to npm
|
|
||||||
- Creates a new tag and release on Github
|
- Creates a new tag and release on Github
|
||||||
|
3. Verify that the `changelog` changes are accurate and the `package.json` version is correct (`git status` && `git diff`)
|
||||||
6. Sit back and have a beer :beer: (or wine :wine_glass:)
|
4. Commit and push
|
||||||
|
5. Sit back and have a beer :beer: (or wine :wine_glass:)
|
||||||
|
|
||||||
### Publish a nightly release
|
### Publish a nightly release
|
||||||
1. Run `gulp publish.nightly`
|
1. Run `gulp nightly`
|
||||||
- Pulls latest
|
- Pulls latest from GitHub
|
||||||
- builds npm package files into dist
|
- Runs `gulp validate`
|
||||||
- updates package.json to a nightly version for publish: 0.1.0-beta.0 results in 0.1.0-beta.0-r8e7684t
|
- Builds npm package files into dist
|
||||||
- publishes to NPM using the nightly tag
|
- Removes debug statements
|
||||||
|
- Publishes to npm using the `nightly` tag with the date/time of publish added to the version: `2.0.0-rc.0` results in `2.0.0-rc.0-201610131811`
|
||||||
2. `npm install ionic-angular@nightly` will now install the latest nightly release
|
2. `npm install ionic-angular@nightly` will now install the latest nightly release
|
||||||
|
3. Run `npm view ionic-angular` to see the latest nightly release
|
||||||
|
|
||||||
|
|
||||||
### Releasing Component Demos
|
### Releasing Component Demos
|
||||||
|
1
scripts/gulp/declarations.d.ts
vendored
1
scripts/gulp/declarations.d.ts
vendored
@ -14,5 +14,6 @@ declare module 'rollup-plugin-commonjs';
|
|||||||
declare module 'rollup-plugin-multi-entry';
|
declare module 'rollup-plugin-multi-entry';
|
||||||
declare module 'rollup-plugin-node-resolve';
|
declare module 'rollup-plugin-node-resolve';
|
||||||
declare module 'rollup-plugin-uglify';
|
declare module 'rollup-plugin-uglify';
|
||||||
|
declare module 'semver';
|
||||||
declare module 'vinyl';
|
declare module 'vinyl';
|
||||||
declare module 'yargs';
|
declare module 'yargs';
|
@ -9,6 +9,7 @@ import { rollup } from 'rollup';
|
|||||||
import * as commonjs from 'rollup-plugin-commonjs';
|
import * as commonjs from 'rollup-plugin-commonjs';
|
||||||
import * as nodeResolve from 'rollup-plugin-node-resolve';
|
import * as nodeResolve from 'rollup-plugin-node-resolve';
|
||||||
import * as runSequence from 'run-sequence';
|
import * as runSequence from 'run-sequence';
|
||||||
|
import * as semver from 'semver';
|
||||||
import { obj } from 'through2';
|
import { obj } from 'through2';
|
||||||
|
|
||||||
import { DIST_BUILD_UMD_BUNDLE_ENTRYPOINT, DIST_BUILD_ROOT, DIST_BUNDLE_ROOT, PROJECT_ROOT, SCRIPTS_ROOT, SRC_ROOT } from '../constants';
|
import { DIST_BUILD_UMD_BUNDLE_ENTRYPOINT, DIST_BUILD_ROOT, DIST_BUNDLE_ROOT, PROJECT_ROOT, SCRIPTS_ROOT, SRC_ROOT } from '../constants';
|
||||||
@ -16,14 +17,18 @@ import { compileSass, copyFonts, createTimestamp, setSassIonicVersion, writePoly
|
|||||||
|
|
||||||
|
|
||||||
task('nightly', (done: (err: any) => void) => {
|
task('nightly', (done: (err: any) => void) => {
|
||||||
runSequence('release.prepareReleasePackage',
|
runSequence('release.pullLatest',
|
||||||
|
'validate',
|
||||||
|
'release.prepareReleasePackage',
|
||||||
'release.removeDebugStatements',
|
'release.removeDebugStatements',
|
||||||
'release.publishNightly',
|
'release.publishNightly',
|
||||||
done);
|
done);
|
||||||
});
|
});
|
||||||
|
|
||||||
task('release', (done: (err: any) => void) => {
|
task('release', (done: (err: any) => void) => {
|
||||||
runSequence('release.prepareReleasePackage',
|
runSequence('release.pullLatest',
|
||||||
|
'validate',
|
||||||
|
'release.prepareReleasePackage',
|
||||||
'release.copyProdVersion',
|
'release.copyProdVersion',
|
||||||
'release.removeDebugStatements',
|
'release.removeDebugStatements',
|
||||||
'release.prepareChangelog',
|
'release.prepareChangelog',
|
||||||
@ -97,7 +102,15 @@ task('release.publishNpmRelease', (done: Function) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
task('release.copyProdVersion', () => {
|
task('release.copyProdVersion', () => {
|
||||||
|
// Increment the version and update the source package file
|
||||||
const sourcePackageJSON = require(`${PROJECT_ROOT}/package.json`);
|
const sourcePackageJSON = require(`${PROJECT_ROOT}/package.json`);
|
||||||
|
|
||||||
|
sourcePackageJSON.version = semver.inc(sourcePackageJSON.version, 'prerelease', true);
|
||||||
|
|
||||||
|
const sourcePrettyPrintedJson = JSON.stringify(sourcePackageJSON, null, 2);
|
||||||
|
writeFileSync(`${PROJECT_ROOT}/package.json`, sourcePrettyPrintedJson);
|
||||||
|
|
||||||
|
// Copy the source package version and update it in the build package file
|
||||||
const packageJsonToUpdate = require(`${DIST_BUILD_ROOT}/package.json`);
|
const packageJsonToUpdate = require(`${DIST_BUILD_ROOT}/package.json`);
|
||||||
|
|
||||||
packageJsonToUpdate.version = sourcePackageJSON.version;
|
packageJsonToUpdate.version = sourcePackageJSON.version;
|
||||||
|
Reference in New Issue
Block a user