{
  "name": "semver-bump",
  "title": "Bump a semantic version",
  "category": "CI/CD",
  "tags": [
    "alpine",
    "ci-cd"
  ],
  "version": "1.0.0",
  "date": "2026-07-17",
  "notes": "Initial release.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/semver-bump/1.0.0.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/semver-bump/1.0.0/template.yaml",
  "entrypoint": "bump",
  "parameters": [
    {
      "name": "current-version",
      "title": "Current version",
      "description": "The current version to bump from.",
      "type": "string",
      "required": true,
      "example": "1.4.2"
    },
    {
      "name": "bump",
      "title": "Bump type",
      "description": "Which part of the version to increment.",
      "type": "string",
      "required": false,
      "default": "patch",
      "enum": [
        "major",
        "minor",
        "patch"
      ]
    }
  ],
  "images": [
    {
      "ref": "alpine@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a",
      "repository": "alpine",
      "digest": "sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/semver-bump/1.0.0/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/semver-bump/1.0.0/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: semver-bump\n  labels:\n    dagweave.io/catalog-item: semver-bump\n  annotations:\n    # The catalog semver this manifest was authored at. The dagweave app records\n    # (catalog-item-id, semver) -\u003e content-hash -\u003e base-vN when it mints the tenant\n    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.\n    dagweave.io/catalog-version: \"1.0.0\"\n    dagweave.io/catalog-category: \"CI/CD\"\nspec:\n  entrypoint: bump\n  templates:\n    - name: bump\n      inputs:\n        parameters:\n          # The current version to bump from, e.g. \"1.4.2\" or \"v1.4.2\".\n          - name: current-version\n          # Which part to increment: major, minor or patch.\n          - name: bump\n            default: patch\n      outputs:\n        parameters:\n          # The computed next version, exposed as an Argo output parameter so\n          # downstream steps can consume it via\n          # {{steps.\u003cname\u003e.outputs.parameters.next-version}} (or tasks.* in a DAG).\n          - name: next-version\n            valueFrom:\n              path: /tmp/next-version\n      container:\n        # Pinned by digest per the catalog convention: an image rebuild can never\n        # silently change the behaviour of an already-released item version.\n        # alpine:3.24 — POSIX shell is enough to parse and increment a semver.\n        image: alpine@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a\n        command: [sh, -c]\n        # The current version and bump type are passed as env vars (below), never\n        # interpolated from Argo into the shell. The result is written to\n        # /tmp/next-version, which the outputs.parameters valueFrom.path reads.\n        args:\n          - |\n            set -eu\n            V=\"${CURRENT#v}\"\n            MAJOR=\"${V%%.*}\"\n            REST=\"${V#*.}\"\n            MINOR=\"${REST%%.*}\"\n            PATCH=\"${REST#*.}\"\n            # Drop any pre-release / build metadata suffix on the patch component.\n            PATCH=\"${PATCH%%[-+]*}\"\n            case \"$BUMP\" in\n              major) MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0 ;;\n              minor) MINOR=$((MINOR + 1)); PATCH=0 ;;\n              patch) PATCH=$((PATCH + 1)) ;;\n              *) echo \"invalid bump type: $BUMP (want major|minor|patch)\" \u003e\u00262; exit 1 ;;\n            esac\n            printf '%s.%s.%s' \"$MAJOR\" \"$MINOR\" \"$PATCH\" | tee /tmp/next-version\n        env:\n          - name: CURRENT\n            value: \"{{inputs.parameters.current-version}}\"\n          - name: BUMP\n            value: \"{{inputs.parameters.bump}}\"\n",
  "templateSha256": "585a7f70d637a157b7e5368e29cd33a70041afb15bf885b29d7366d7a647ef23",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/semver-bump",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
