@valueadd/ci
v1.2.1
Published
CI scripts
Downloads
3
Maintainers
Keywords
Readme
CI Scripts
Installation
npm install @valueadd/ci --save-optional
Commands and usage
print-version
Print version based on package.json and git commit hash.
validate-branch <branch>
Check if branch is correctly named
validate-nx-tags
Check if all nx tags are valid.
validate-commit <branch>
Check if commit messages are correctly formatted.
prettier-check <files>
Check with prettier if files are correctly formatted.
build-affected [options]
Build affected apps.
Options:--base <base>
- base commit or branch for finding affected apps
--buildFlags <buildFlags>
- build flags eg. --aot --build-optimizer=false
(default: "--aot --build-optimizer=false")
--head <head>
- head commit or branch for finding affected apps
--nodeFlags <nodeFlags>
- nodejs flags eg. --max-old-space-size=6144
(default: "")
--npmCommands <npmFlags>
- additional npm commands to run before build separated with &&
eg. build:ci:prepare && build:ci:notify
(default: "")
Configuration
Create ci.json5
file in repository with the following content:
{
branch: {
types: ['feature', 'bugfix', 'hotfix', 'release', 'refactor'], // types of branches
pattern: '(.*)' // RegExp that overrides "types" (types are ignored)
},
commit: {
maxLength: 100, // max commit length
types: [
// available types in commits
'build',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'release',
'style',
'test'
],
scopes: ['test', 'report', 'document'] // available scopes in commits
},
prettier: {
extensionsToCheck: ['.json', '.ts', '.js', '.html', '.css', '.scss'] // extensions to check with prettier
}
}