From a728416e12195d5ac4e4c26ea9a3a16bd9289eed Mon Sep 17 00:00:00 2001 From: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com> Date: Fri, 24 Apr 2020 20:52:16 +0200 Subject: [PATCH] artifactPrepareVersion: define versioning scheme (#1457) --- cmd/artifactPrepareVersion.go | 3 +- cmd/artifactPrepareVersion_generated.go | 44 +++++++++++++++---------- pkg/versioning/inifile.go | 18 ++++++---- pkg/versioning/versioning.go | 15 +++++---- pkg/versioning/versioning_test.go | 5 ++- resources/metadata/versioning.yaml | 9 ++++- 6 files changed, 61 insertions(+), 33 deletions(-) diff --git a/cmd/artifactPrepareVersion.go b/cmd/artifactPrepareVersion.go index 7d439c363..a7b1c2670 100644 --- a/cmd/artifactPrepareVersion.go +++ b/cmd/artifactPrepareVersion.go @@ -75,8 +75,9 @@ func runArtifactPrepareVersion(config *artifactPrepareVersionOptions, telemetryD GlobalSettingsFile: config.GlobalSettingsFile, M2Path: config.M2Path, ProjectSettingsFile: config.ProjectSettingsFile, - VersionField: config.CustomversionField, + VersionField: config.CustomVersionField, VersionSection: config.CustomVersionSection, + VersioningScheme: config.CustomVersioningScheme, } var err error diff --git a/cmd/artifactPrepareVersion_generated.go b/cmd/artifactPrepareVersion_generated.go index 3aa8b9b56..4684b7794 100644 --- a/cmd/artifactPrepareVersion_generated.go +++ b/cmd/artifactPrepareVersion_generated.go @@ -16,21 +16,22 @@ import ( ) type artifactPrepareVersionOptions struct { - BuildTool string `json:"buildTool,omitempty"` - CommitUserName string `json:"commitUserName,omitempty"` - CustomversionField string `json:"customversionField,omitempty"` - CustomVersionSection string `json:"customVersionSection,omitempty"` - DockerVersionSource string `json:"dockerVersionSource,omitempty"` - FilePath string `json:"filePath,omitempty"` - GlobalSettingsFile string `json:"globalSettingsFile,omitempty"` - IncludeCommitID bool `json:"includeCommitId,omitempty"` - M2Path string `json:"m2Path,omitempty"` - Password string `json:"password,omitempty"` - ProjectSettingsFile string `json:"projectSettingsFile,omitempty"` - TagPrefix string `json:"tagPrefix,omitempty"` - Username string `json:"username,omitempty"` - VersioningTemplate string `json:"versioningTemplate,omitempty"` - VersioningType string `json:"versioningType,omitempty"` + BuildTool string `json:"buildTool,omitempty"` + CommitUserName string `json:"commitUserName,omitempty"` + CustomVersionField string `json:"customVersionField,omitempty"` + CustomVersionSection string `json:"customVersionSection,omitempty"` + CustomVersioningScheme string `json:"customVersioningScheme,omitempty"` + DockerVersionSource string `json:"dockerVersionSource,omitempty"` + FilePath string `json:"filePath,omitempty"` + GlobalSettingsFile string `json:"globalSettingsFile,omitempty"` + IncludeCommitID bool `json:"includeCommitId,omitempty"` + M2Path string `json:"m2Path,omitempty"` + Password string `json:"password,omitempty"` + ProjectSettingsFile string `json:"projectSettingsFile,omitempty"` + TagPrefix string `json:"tagPrefix,omitempty"` + Username string `json:"username,omitempty"` + VersioningTemplate string `json:"versioningTemplate,omitempty"` + VersioningType string `json:"versioningType,omitempty"` } type artifactPrepareVersionCommonPipelineEnvironment struct { @@ -171,8 +172,9 @@ Define ` + "`" + `buildTool: custom` + "`" + `, ` + "`" + `filePath: