Skip to content

Publishing new versions

Nikolay Alipiev edited this page Jan 31, 2020 · 7 revisions

Publish igniteui-cli packages

The igniteui-cli monorepo contains several modular packages that together combine in the igniteui command line tool.

The below steps will walk your through the process of configuring and publishing new versions of the packages.

Prerequisites

In order to publish a new version, you first need to have a local clone of the igniteui-cli repo.

You need to have yarn installed on your machine.

Once you've cloned the repo, run the following:

cd [%your-repo-location%]
git fetch origin
git checkout vNext
yarn install

Once all packages have been installed, you're good to go!

Prepare local state

The next steps of the publish process are executed on your local repo instance. Note Before proceeding with the next step, make sure your repository state is clean.

Run version script

When you need to publish a new version, first thing you need to do is to build the project:

yarn run build

Then you need to run our release script:

yarn run release [%version%]

Passing a version is optional - if you do not specifically pass a version, the script will increment a patch version from the current one (still remaining on the same release level - e.g. alpha, beta or proper).

Review changes

Verify files

Once the release script is finished, verify that the output is correct - the only changes to should be to the CHANGELOG.md and the separate package.json files.

The version of the igniteui-cli and @igniteui/cli-core packages should be the same as the version passed in the release command (or and incremented patch version).

The version of the @igniteui/angular-schematics and @igniteui/angular-templates packages depend both on the latest supported Angular version and the version of the core package, following this convention: [%angular-major%].[%angular-minor%].[%version%].

For example, if the latest Angular version supported by the cli angular-templates is 9.0, after running

yarn run release 5.1.0-beta.3

the version of the packages in the repo should be as follows:

  • igniteui-cli - 5.1.0-beta.3
  • @igniteui/cli-core - 5.1.0-beta.3
  • @igniteui/angular-schematics - 9.0.510-beta.3
  • @igniteui/angular-templates - 9.0.510-beta.3

The package dependencies across all packages should also be updated with the proper versions.

Update Changelog

The CHANGELOG.md will be populated with entries for each package and contain a bug fixes and features section for each packages that was affected by any feat or fix commit.

Open the CHANGELOG.md and manually edit the file so it only contains the relevant information for each packages. When a bug fix or feature is present in multiple packages, leave it only present in the main one (e.g. if a commit fixes a bug in the angular-schematics packages, while also adjusting functionality in the cli-core, leave the entry only in the angular-schematics package). For packages that have no bug fixes or features, just leave a version-bump note.

Commit changes

Once you've verified the files and updated the changelog, commit your current repo state with an appropriate message (e.g. release: [%version%]). Note If you cannot contribute to the vNext branch, commit your changes to a separate branch and create a pull request.

Tag version

Once the version commit is the vNext branch's HEAD, you can now proceed to tag a version from github

Draft a new release

In the form, fill out the fields as follows:

  • Target - vNext branch
  • Tag version - the latest tag. An autocomplete menu will show up once you start typing, choose the appropriate version from there, to avoid typos.
  • Release title - copy the tag version
  • Release message - Take changelog part, related to that release
  • Pre-release - mark the checkbox accordingly - if the version tag is alpha, beta, rc, etc., mark it as a pre-release. If not - leave blank.

Verify that all of the fields are properly filled out, then hit Publish release.

Build script

The automated build script should take care of the rest - you can expect the package to be accessibly through npm after a short while.

Update references in the igniteui-angular

The igniteui-angular product, version >= 9, is using @igniteui/angular-schematics package. That reference needs to be updated when at least a major version of the igniteui-cli and @igniteui/angular-schematics is released. Use for reference the following PR. This update needs to be done manually, as far as this is not the project main package.json and package.lock is missing.

Note: In addition, as seen in the PR above, the version of the @angular-devkit/schematics needs to be synced with the one in the igniteui-cli. This means that when updates for angular dependencies in igniteui-angular and igniteui-cli should happen synchronously and before publishing the packages from the igniteui-cli repository.