version
A set of tasks to manage version.
version template details
- Status: stable
- File: https://gitlab.com/op_so/task/task-templates/-/raw/main/Taskfile.d/version.yml
- Home: https://gitlab.com/op_so/task/task-templates
- License: MIT
List of tasks
Tasks | Description |
---|---|
version:format-semver |
Generate a version in semver format : VERSION|V=5.7 (*) |
version:get-cli-version |
Get version from CLI output of a --version option: OUTPUT|O='Task version: v3.19.0 (h1:jS1s2...' (*) |
version:get-docker-apk-version |
Get version of an APK package of an Alpine docker image: IMG|I=jfxs/alpine-task APK|A=squid (*) |
version:get-docker-cli-version |
Get version from CLI output command of a Docker container: IMG|I=jfxs/alpine-task CMD|C=task --version (*) |
version:get-docker-manifest-version |
Get version from docker manifest with skopeo: IMG|I=index.docker.io/jfxs/alpine-task [LABEL|L=org.opencontainers.image.version] (*) |
version:get-latest-github |
Get latest version from Github: REPO|R=go-task/task (*) |
version:get-latest-npm |
Get latest version from NPM registry: PACKAGE|P=wrangler (*) |
version:get-latest-pypi |
Get latest version from PyPI: PACKAGE|P=ansible-core (*) |
version:get-major-minor-version |
Get majeur and minor version number from full version: VERSION|V=3.19.1 (*) |
version:get-major-version |
Get majeur version number from full version: VERSION|V=3.19.1 (*) |
global variables
Variables | Description | Default value |
---|---|---|
- | - | - |
version:format-semver
Generate a version in semver format : VERSION|V=5.7 (*)
[VERSION] format-semver:
Usage: task version:format-semver VERSION|V=<version>
See: https://semver.org/ for Semantic Versioning.
Remove <build> if any, format to <major> "." <minor> "." <patch> "-" <pre-release>
<pre-release> is optional.
Example: task version:format-semver VERSION=5.7 will return 5.7.0
Arguments | Description |
---|---|
VERSION | V |
Version to format (required) |
Requirements:
- None
version:get-cli-version
Get version from CLI output of a --version option: OUTPUT|O='Task version: v3.19.0 (h1:jS1s2...' (*)
[VERSION] Get version from CLI output:
Usage: task version:get-cli-version OUTPUT|O=<cli_output>/<repo>
Arguments | Description |
---|---|
OUTPUT | O |
CLI output (required) |
Requirements:
- None
version:get-docker-apk-version
Get version of an APK package of an Alpine docker image: IMG|I=jfxs/alpine-task APK|A=squid (*)
[VERSION] Get version of an APK package:
Usage: task version:get-docker-apk-version IMG|I=<image> APK|A=<package>
Arguments | Description |
---|---|
APK | A |
Alpine package (required) |
IMG | I |
Image to run (required) |
Requirements:
- docker
version:get-docker-cli-version
Get version from CLI output command of a Docker container: IMG|I=jfxs/alpine-task CMD|C=task --version (*)
[VERSION] Get version from CLI output command of a Docker container:
Usage: task version:get-docker-cli-version IMG|I=<image> CMD|C=<shell_command>
Arguments | Description |
---|---|
IMG | I |
Image to run (required) |
CMD | C |
CLI command (required) |
Requirements:
- docker
version:get-docker-manifest-version
Get version from docker manifest with skopeo: IMG|I=index.docker.io/jfxs/alpine-task [LABEL|L=org.opencontainers.image.version] (*)
[VERSION] Get version from docker manifest with skopeo:
Usage: task version:get-docker-manifest-version IMG|I=<image> [LABEL|L=<label_of_version>]
Arguments | Description |
---|---|
IMG | I |
Image to analyze (required) |
LABEL | L |
Label of the version (optional, default org.opencontainers.image.version) |
Requirements:
- docker or skopeo
version:get-latest-github
Get latest version from Github: REPO|R=go-task/task (*)
[VERSION] Get latest version from Github:
Usage: task version:get-latest-github REPO|R=<owner>/<repo>
Arguments | Description |
---|---|
REPO | R |
Repository in format: |
Requirements:
- curl or wget
- jq
version:get-latest-npm
Get latest version from NPM registry: PACKAGE|P=wrangler (*)
[VERSION] Get latest version from NPM registry:
Usage: task version:get-latest-npm PACKAGE|P=<package>
Arguments | Description |
---|---|
PACKAGE | P |
Package name (required) |
Requirements:
- curl or wget
- jq
version:get-latest-pypi
Get latest version from PyPI: PACKAGE|P=ansible-core (*)
[VERSION] Get latest version from PyPI:
Usage: task version:get-latest-github PACKAGE|P=<package_name>
Arguments | Description |
---|---|
PACKAGE | P |
Package name (required) |
Requirements:
- curl or wget
- jq
version:get-major-minor-version
Get majeur and minor version number from full version: VERSION|V=3.19.1 (*)
[VERSION] Get majeurand minor version number from full version:
Usage: task version:get-major-minor-version VERSION|V=<full_version>/<repo>
Example: task version:get-major-minor-version VERSION=3.19.1 will return 3.19
Arguments | Description |
---|---|
VERSION | V |
Version (required) |
Requirements:
- None
version:get-major-version
Get majeur version number from full version: VERSION|V=3.19.1 (*)
[VERSION] Get majeur version number from full version:
Usage: task version:get-major-version VERSION|V=<full_version>/<repo>
Example: task version:get-major-version VERSION=3.19.1 will return 3
Arguments | Description |
---|---|
VERSION | V |
Version (required) |
Requirements:
- None