@shelf/ci-utils
v0.3.0
Published
CI utils for Shelf projects
Downloads
6,221
Maintainers
Keywords
Readme
@shelf/ci-utils
Install
$ npx -p=@shelf/ci-utils <cmd> [args...]
Usage
Get latest git tag version
Set the RELEASE_VERSION
to .env
file in your project.
Applicable for master branch only.
For example, if you have a git tag v1.0.0
-> 1.0.0
.
For other branches it will return latest
.
npx -p=@shelf/ci-utils get-git-version
Get AWS SSM parameter
Set the SSM parameter name to .env
file in your project.
By default, It would append the ENVIRONMENT
to the parameter name.
Yuo can override it by passing the whole parameter name in
/<env>/<param-name>
format (allowed envs: prod
, staging
).
npx -p=@shelf/ci-utils get-ssm-param <env-name> <param-name>
# Given: the /prod/s3_bucket parameter in SSM equals to 'my-prod-bucket' & ENVIRONMENT=prod
npx -p=@shelf/ci-utils get-ssm-param MY_PARAM s3_bucket # /prod/s3_bucket MY_PARAM=my-prod-bucket in .env
npx -p=@shelf/ci-utils get-ssm-param MY_PARAM /staging/s3_bucket # /staging/s3_bucket MY_PARAM=stage_bucket in .env
Publish
$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags
License
MIT © Shelf