1.1.0 • Published 2 years ago

@hughescr/serverless-plugin-git-version-json v1.1.0

Weekly downloads
8
License
BSD-3-Clause-Clea...
Repository
github
Last release
2 years ago

Serverless plugin to track git version in deployments

This plugin for serverless will improve create a file called git_version.json during artifact creation. The file contents will be as:

{
    gitVersion: "STUFF"
}

where STUFF is the output of git describe --tags --dirty. That way you can require() the JSON file in your code to get the git version this deployment was from at runtime.

To use this plugin

  • yarn add @hughescr/serverless-plugin-git-version-json --dev or npm install --save-dev @hughescr/serverless-plugin-git-version-json
  • Add serverless-plugin-git-version-json to the plugins section of your serverless.yml
  • Add versionJSONFile: git_version.json to the custom section of your serverless.yml

eg:

...
package:
  exclude:
    - somefile.json
    - tests/**
    - package.json
    - serverless.yml

custom:
  versionJSONFile: git_version.json

plugins:
  - serverless-plugin-git-version-json
...
1.1.0

2 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

6 years ago