Skip to content
Snippets Groups Projects

Release Ecolyo to Cozy

!!! abstract "Procedure summary" - tag - build - deploy - publish

Pre-requisites

Make sure that:

  • you are on the right branch (dev or master)
  • your branch is up to date
  • you node modules are up to date

Bump versions, Tag and create changelog

manifest.webapp

Checkout on the branch dev and bump the version number in manifest.webapp. Use a similar commit : "bump manifest to X.Y.Z"

!!! warning

Commit but don't push so pipelines are not yet triggered.

You don't have to change the version inside `package.json`, standard-version will do it.

Tag with Standard-version

!!! question "Standard version"

[Standard-version](https://github.com/conventional-changelog/standard-version) is library that facilitates creating tags and update changelog (it uses conventional commit so make sure you follow the guidelines described [here](./gitflow.md#conventional-commit)).

A release script is inside package.json, run it or use the standard-release command :

yarn release 2.X.Y
# Equivalent to
yarn standard-version 2.X.Y

⚠️ Do not push with VS Code

The script will give you a command to push tags on the remote. (something like this, depending on the branch)

git push --follow-tags origin dev

??? bug "Handle mistake tags"

If you see a bug in the Changelog (the last version doesn't compare without the previous version correctly or you have plenty of undesired commits from previous versions), it means you made something wrong when you pushed your commit (basically you may have made a classical git push instead of git push --follow-tags origin dev), and you tag is not correctly annotated or annotated with the wrong commit.

You can list the annotated tag with the following command

```sh
git tag -n
```

A normal tag should have its related commit like this :

```
v2.1.3          chore(release): 2.1.3
v2.2.0          chore(release): 2.2.0
```

If you see some mistakes in tag annotation you can change it with the following command :

```sh
git tag -a v2.1.3 COMMIT_SHA -m 'chore(release): 2.1.3' -f
```

This command will annotate an existing tag (v2.1.3 with chore(release): 2.1.3 here) to the right commit. You'll have to pass the commit_sha from the related chore commit.

Create a release

Changelog.md will be updated with commits of the current version.

To create a release, copy the content of the latest version bump and go to Repository > Tags and click the edit button. Paste the version changelog inside the Release notes and click create.

Deploy build

After pushing your tag, the pipelines should be triggered.

Verify that the build branch is up to date Repository > Branches

!!! note "Manually push build"

```sh
yarn build:browser
yarn deploy #prod config
```

Publish build branch to Cozy

You can deploy content of build branch into Cozy registry by using the cozy-app-publish command after replacing following value:

  • $COZY_TOKEN: token provided by Cozy team
  • $VERSION_NUMBER: version of the application
  • $COZY_SPACE: space of the Cozy

⚠️ Make sure that the build branch is up to date and was build with prod configuration

yarn cozy-app-publish \
--token $COZY_TOKEN \
--build-url https://forge.grandlyon.com/web-et-numerique/factory/llle_project/ecolyo/-/archive/build/ecolyo-build.tar.gz \
--manual-version $VERSION_NUMBER \
--space $COZY_SPACE

More information at cozy-app-publish

Update master

Once you're finish, you should create a new merge request from dev to master.