Skip to content

Commit adaa0f8

Browse files
committed
Add comments clarifying which version numbers are used
The version numbers in the helm Chart.yaml are set to 0.0.0 to make it clear they are not the ones being used. The Cargo.toml version number is also set to "0.0.0" and is instead updated prior to building the image as part of the publish workflow.
1 parent bccc926 commit adaa0f8

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

.github/workflows/publish.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
tags: |
3030
type=semver,pattern={{version}}
3131
32+
- name: Set application version
33+
if: ${{ github.ref_type == 'tag' }}
34+
run: sed -i 's/^version = ".*"$/version = "${{ steps.meta.outputs.version }}"/' Cargo.toml
35+
3236
- name: Build image
3337
uses: docker/build-push-action@v6
3438
env:

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[package]
22
name = "numtracker"
3-
version = "0.1.1"
3+
# This version is *not* used for the built container image. It is set during the
4+
# CI build process so that the version always matches the latest git tag.
5+
version = "0.0.0"
46
edition = "2021"
57
license = "Apache-2.0"
68

helm/numtracker/Chart.yaml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
11
apiVersion: v2
22
name: numtracker
33
description: Helm chart to deploy the numtracker service for unifying beamline filenaming
4-
5-
# A chart can be either an 'application' or a 'library' chart.
6-
#
7-
# Application charts are a collection of templates that can be packaged into versioned archives
8-
# to be deployed.
9-
#
10-
# Library charts provide useful utilities or functions for the chart developer. They're included as
11-
# a dependency of application charts to inject those utilities and functions into the rendering
12-
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
134
type: application
145

15-
# This is the chart version. This version number should be incremented each time you make changes
16-
# to the chart and its templates, including the app version.
17-
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
6+
# These versions are ignored and are automatically set via the CI process to the version from the tag
197

20-
# This is the version number of the application being deployed. This version number should be
21-
# incremented each time you make changes to the application. Versions are not expected to
22-
# follow Semantic Versioning. They should reflect the version the application is using.
23-
# It is recommended to use it with quotes.
24-
appVersion: "0.1.0"
8+
# This is the version of the helm chart
9+
version: 0.0.0
10+
# This is the version number of the application being deployed by the helm chart
11+
appVersion: "0.0.0"

0 commit comments

Comments
 (0)