Config file has Yaml format.
.Atc.yaml settings are always taken from default branch!
- Path: Path to package manager configuration file.
- Behavior: Commit to be used to create tag.
- Template: Tag template.
- Branch: Branch for track version changes.
- RegexStr: Regex String to get version from custom configuration file.
- Minimal configuration. When the configuration file pom.xml changes the version project in default branch from 1.0.0 to 1.0.1, this example will create the tag "v1.0.1" in current commit.
path: "pom.xml"
- Full configuration with Node Package Manager. When the configurate file package.json changes the version project in release branch from 1.1.0 to 1.1.1, this example will create a tag "v1.1.1-alfaNPM" in previous commit.
path: "package.json"
behavior: "before"
template: "{{.Version}}-alfaNPM"
branch: "release"
- Full configuration with custom package manager. When the configurate file custom_package_manager.txt changes the version project in release branch from 1.2.0 to 1.2.1, this example will create a tag "v1.2.1-custom" in previous commit.
path: "custom_package_manager.txt"
behavior: "before"
template: "{{.Version}}-custom"
branch: "release"
regexStr: "vers: (.+)"
name: custom name
vers: 1.2.1
project: custom project
ATC supports: Gradle(build.gradle), NPM(package.json), Maven(pom.xml), Flutter(pubspec.yaml) or generic config file if RegexStr is used. Path uses relative link to the package manager configuration file. Don't use "/" preffix.
path: "pom.xml"
path: "app/build.gradle"
path: "custom_package_manager.txt"
ATC can create tag for current commit, use after for this, or previous commit, use before for this. The default behavior is after.
behavior: "after" # for use current commit
behavior: "before" # for use previous commit
ATC Template works with GO Template. Use "{{.Version}}" to write the number to the tag. ATC supports the function time.Now(), to use it use {{Time}}. The default template is "v{{.Version}}".
template: "v{{.Version}}" # for version = 2.0.0, tag = "v2.0.0"
template: "v{{.Version}}-alfa{{.Version}}" # for version = 2.0.1, tag = "v2.0.1-alfa2.0.1"
template: "{{.Version}}-{{Time.Hour}}" # for version = 2.0.2, tag = "v2.0.2-`Hours now`"
ATC can track non-default branch.
branch: "main"
branch: "issue-404"
branch: "customBranch"
Write Path to configuration file and create regex string if you are not using the default ATC package manager. The regexstr must contain one group with version number.
regexstr: "version: (.+)" # for `version: 2.0.0`
regexstr: "\"version\": \"(.+)\"" # for `"version": "2.0.1""`