docker-meta
Advanced tools
Comparing version
@@ -0,1 +1,8 @@ | ||
## [3.1.0](https://github.com/felipecrs/docker-meta/compare/v3.0.0...v3.1.0) (2021-03-16) | ||
### Features | ||
* get `branch` from `git` ([#29](https://github.com/felipecrs/docker-meta/issues/29)) ([c9bca70](https://github.com/felipecrs/docker-meta/commit/c9bca70a859fff8141fb190938be273cd4a01f9e)) | ||
## [3.0.0](https://github.com/felipecrs/docker-meta/compare/v2.1.0...v3.0.0) (2021-03-03) | ||
@@ -2,0 +9,0 @@ |
@@ -20,3 +20,2 @@ "use strict"; | ||
} | ||
; | ||
class DockerMeta extends command_1.Command { | ||
@@ -43,3 +42,6 @@ // eslint-disable-next-line complexity | ||
? config.latest | ||
: false, version: flags.version || process.env.VERSION || config.version, branch: flags.branch || process.env.BRANCH || config.branch, "git-sha": flags["build-date"] || | ||
: false, version: flags.version || process.env.VERSION || config.version, branch: flags.branch || | ||
process.env.BRANCH || | ||
config.branch || | ||
execa.commandSync("git branch --show-current").stdout, "git-sha": flags["build-date"] || | ||
process.env.GIT_SHA || | ||
@@ -98,3 +100,4 @@ process.env.GIT_COMMIT || | ||
outputTarget.labels["org.label-schema.vsc-ref"] = config["git-sha"]; | ||
outputTarget.labels["org.label-schema.build-date"] = config["build-date"]; | ||
outputTarget.labels["org.label-schema.build-date"] = | ||
config["build-date"]; | ||
outputTarget.labels["org.label-schema.version"] = config.version; | ||
@@ -110,3 +113,3 @@ outputTarget.labels["org.label-schema.schema-version"] = "1.0.0-rc1"; | ||
if (config.latest) { | ||
outputTarget.tags.push(...inputTarget.images.map((image) => `${image}:${config.branch.replace(/[^a-zA-Z0-9._-]+/g, '-')}`)); | ||
outputTarget.tags.push(...inputTarget.images.map((image) => `${image}:${config.branch.replace(/[^a-zA-Z0-9._-]+/g, "-")}`)); | ||
// eslint-disable-next-line max-depth | ||
@@ -113,0 +116,0 @@ if (config.branch === "master" || config.branch === "develop") { |
{ | ||
"name": "docker-meta", | ||
"description": "Generates docker meta information such as tags, labels and build-args.", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"author": "Felipe Santos @felipecrs", | ||
@@ -29,2 +29,3 @@ "bin": { | ||
"@types/common-tags": "^1.8.0", | ||
"@types/jest": "^26.0.20", | ||
"@types/listr": "^0.14.2", | ||
@@ -31,0 +32,0 @@ "@types/node": "^10.17.28", |
@@ -26,3 +26,3 @@ # docker-meta | ||
$ docker-meta (-v|--version|version) | ||
docker-meta/3.0.0 linux-x64 node-v12.21.0 | ||
docker-meta/3.1.0 linux-x64 node-v12.21.0 | ||
$ docker-meta --help [COMMAND] | ||
@@ -29,0 +29,0 @@ USAGE |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
16275
2.92%225
1.35%30
3.45%10
11.11%