@coara/js-releases
v1.0.16
Published
Sharable code related to release versions for Coara projects
Downloads
557
Keywords
Readme
@coara/js-releases
$ create-release
Description
Read last tag matching v[0-9].[0-9].[0-9]
and taking last number as a patch version increases it by 1, then create and push a tag with that new version.
Usage
$ create-release [--dry-run]
$ overwrite-release
Description
Read last tag matching v[0-9].[0-9].[0-9]
as a version, it concatenates #BUILD_NUMBER
and inside the FILE_PATH
search for the MACRO
to be replaced with that version string.
Usage
$ overwrite-release [--file-path FILE_PATH] [--build-number BUILD_NUMBER] [--macro MACRO] [--dry-run]
# Default FILE_PATH is src/environments/environment.production.ts
# Default BUILD_NUMBER is BITBUCKET_BUILD_NUMBER || BITRISE_BUILD_NUMBER || 0
# Default MACRO is $release
Example
* In a case that we have the following structure:
.
└── config
└── charts
└── vars.yml
* vars.yml looks like this:
variables:
api1: https://api.com/path
release: <RELEASE>
* We need to inject the value for that RELEASE token, the command should looks as follows:
$ overwrite-release --file-path config/charts/vars.yml --build-number 42 --macro RELEASE
$ overwrite-changelog
Description
This script generates a json file that contains the changelog of the master branch of the repository. In addition, this information is attached to the information related to the tour ticket that refers to each commit within the changelog.
To use this script you need to create a configuration file like the following:
{
"changelog-file-path": "changelog.json",
"bitbucket-host": "https://____.atlassian.net",
"bitbucket-project": "XXX",
"custom-properties": ["custom-1", "custom-2"]
}
$ overwrite-changelog [--config-path CONFIG_PATH] [--bitbucket-user BITBUCKET_USER] [--bitbucket-password BITBUCKET_PASSWORD]
# Default CONFIG_PATH is ./changelog-config.json
Changelog File Example
[
{
"hash": "7451389e07bd2f8c4444e1cc58526e3e491cc3fc",
"commitMessage": "Merge XXX-0000 in master",
"author": "Author Name",
"date": "Wed, 15 Sep 2021 15:12:33 +0200",
"jiraIssue": "XXX-0000",
"type": "Task",
"release": "v0.0.1",
.
.
.
"custom-1": "value",
"custom-2": "value"
}
]