diff --git a/Makefile b/Makefile index 43a7c8f1..ac8cc0c3 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # ============= # This file is automatically generated from the templates in stackabletech/operator-templating -# DON'T MANUALLY EDIT THIS FILE +# DO NOT MANUALLY EDIT THIS FILE # ============= # This script requires https://github.com/mikefarah/yq (not to be confused with https://github.com/kislyuk/yq) @@ -10,7 +10,12 @@ TAG := $(shell git rev-parse --short HEAD) -VERSION := $(shell cargo metadata --format-version 1 | jq '.packages[] | select(.name=="stackable-spark-k8s-operator") | .version') +VERSION := $(shell cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="stackable-spark-k8s-operator") | .version') +IS_NIGHTLY := $(shell echo "${VERSION}" | grep -- '-nightly$$') +# When rendering docs we want to simplify the version number slightly, only rendering "nightly" for nightly branches +# (since we only render nightlies for the active development trunk anyway) and chopping off the semver patch version otherwise +DOCS_VERSION := $(if ${IS_NIGHTLY},nightly,$(shell echo "${VERSION}" | sed 's/^\([0-9]\+\.[0-9]\+\)\..*$$/\1/')) +export VERSION IS_NIGHTLY DOCS_VERSION SHELL=/bin/bash -euo pipefail @@ -38,7 +43,8 @@ chart-clean: rm -rf deploy/helm/spark-k8s-operator/crds version: - yq eval -i '.version = ${VERSION} | .appVersion = ${VERSION}' /dev/stdin < deploy/helm/spark-k8s-operator/Chart.yaml + yq eval -i '.version = strenv(VERSION) | .appVersion = strenv(VERSION)' /dev/stdin < deploy/helm/spark-k8s-operator/Chart.yaml + yq eval -i '.version = strenv(DOCS_VERSION) | .prerelease = strenv(IS_NIGHTLY) != ""' /dev/stdin < docs/antora.yml config: if [ -d "deploy/config-spec/" ]; then\ diff --git a/deploy/helm/spark-k8s-operator/Chart.yaml b/deploy/helm/spark-k8s-operator/Chart.yaml index a73bdbaf..c2bc7577 100644 --- a/deploy/helm/spark-k8s-operator/Chart.yaml +++ b/deploy/helm/spark-k8s-operator/Chart.yaml @@ -1,7 +1,7 @@ --- apiVersion: v2 name: spark-k8s-operator -version: 0.1.0 +version: "0.1.0" appVersion: "0.1.0" description: The Stackable Operator for Apache Spark-on-Kubernetes home: https://github.com/stackabletech/spark-k8s-operator diff --git a/docs/antora.yml b/docs/antora.yml index 9c88ac60..67e53a40 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -1,6 +1,7 @@ --- name: spark-k8s -version: master +version: "0.1" title: Stackable Operator for Apache Spark on Kubernetes nav: - modules/ROOT/nav.adoc +prerelease: false