1.3.2 • Published 3 years ago

@purple/serverless-git-branch-stage-plugin v1.3.2

Weekly downloads
7,523
License
MIT
Repository
github
Last release
3 years ago

serverless-git-branch-stage-plugin

CI Status Badge

This plugin provides two Serverless variables:

  • git:stage - branch name converted to camel case
  • git:basePath - branch name converted to kebab-case which is usefull for serverless-domain-manager plugin

Install

$ npm install --save-dev @purple/serverless-git-branch-stage-plugin

Add the plugin to your serverless.yml file

plugins:
  - '@purple/serverless-git-branch-stage-plugin'

Prerequisites:

This plugin requires git to be installed. Tested on Linux and macOS.

Example

provider:
  name: aws
  stage: ${git:stage}
custom:
  customDomain:
    domainName: serverless.foo.com
    basePath:  ${git:basePath}

Overriding branch name

You can override the branch name with envrionment variable SLS_MOCK_BRANCH.

$ SLS_MOCK_BRANCH=master serverless deploy 
1.3.2

3 years ago

1.3.0

3 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago