Skip to content
Snippets Groups Projects
release.md 2.41 KiB
Newer Older
  • Learn to ignore specific revisions
  • # Release
    
    This section will show you how to properly create a release for the app.
    
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    ## Conventional commit
    
    
    The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.
    
    The commit message should be structured as follows:
    
    ```
    <type>[optional scope]: <description>
    
    [optional body]
    
    [optional footer(s)]
    ```
    
    The commit contains the following structural elements, to communicate intent to the consumers of your library:
    
    * fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in Semantic Versioning).
    * feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).
    * BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
    * types other than fix: and feat: are allowed, for example @commitlint/config-conventional (based on the the Angular convention) recommends build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, and others.
    * footers other than BREAKING CHANGE: <description> may be provided and follow a convention similar to git trailer format.
    
    ## standard-version
    
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    Standard-version is library javascript that allow to handle easily tags and changelog file.
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    Just run the following command in order to create a release tag, bump package.json version and update changelog file.
    
    First manually bump the manifest version (for cozy apps) in manifest.webapp and use the following commit format : 'bump manifest version to X.X.X'
    Then launch the following command : 
    
    
    ```bash
    yarn run release -- --release-as X.X.X # replace with version number (ex: 1.2.0)
    ```
    
    
    Once it is done execute to push the tagged commit :
    
    ```
    git push --follow-tags origin dev
    ```
    
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    Don't forget to add release notes in gitlab in *your project -> repository -> tags -> edit release notes *
    
    You can copy paste the last changelogs in the release notes.
    
    
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    ## Useful links
    
    [Conventional commit doc](https://www.conventionalcommits.org/en/v1.0.0/)
    
    [Lib link](https://github.com/conventional-changelog/standard-version)