You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by sl...@apache.org on 2025/03/19 12:43:25 UTC
(daffodil-infrastructure) branch main updated: Change how we determine the project version
This is an automated email from the ASF dual-hosted git repository.
slawrence pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-infrastructure.git
The following commit(s) were added to refs/heads/main by this push:
new dc50b46 Change how we determine the project version
dc50b46 is described below
commit dc50b4620963af83704a12aac5ec54f9580b7ec5
Author: Steve Lawrence <sl...@apache.org>
AuthorDate: Fri Mar 7 14:03:17 2025 -0500
Change how we determine the project version
With the use of the daffodil-release-cadndiate action, projects are
required to specify their version in a VERSION file in the root of the
repository. This is a much easier way to get the version instead of
grepping and cutting files.
We also change the select so it doesn't exit on error, instead letting
the user try to reselect a project to build.
DAFFODIL-2972
---
.../build-release/src/daffodil-build-release | 26 +++++++++-------------
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/containers/build-release/src/daffodil-build-release b/containers/build-release/src/daffodil-build-release
index 22dc3e2..18285f0 100755
--- a/containers/build-release/src/daffodil-build-release
+++ b/containers/build-release/src/daffodil-build-release
@@ -25,27 +25,23 @@ export SOURCE_DATE_EPOCH=$(git show --no-patch --format=%ct HEAD)
echo "Select a project: "
select PROJECT in daffodil daffodil-sbt daffodil-vscode; do
- case $PROJECT in
- "daffodil" | "daffodil-sbt")
- PROJECT_VERSION=$(grep 'version :=' build.sbt | cut -d\" -f2)
- break
- ;;
- "daffodil-vscode")
- PROJECT_VERSION=$(grep '"version"' package.json | cut -d\" -f4)
- break
- ;;
- *)
- echo "unknown project: $PROJECT" >&2
- exit 1
- ;;
- esac
+ if [[ -n "$PROJECT" ]]
+ then
+ break;
+ fi
+ echo "invalid choice, select again"
done
+
echo
read -p "Pre-release label (e.g. rc1 to rc99) or empty for final release: " PRE_RELEASE_LABEL
echo
-# apppend the pre-release label if it is not empty/all whitepsace
+# determine the release version. If the pre-release label is not empty or all
+# whitespace, then append it to the project version. Otherwise we just build
+# without a pre-release label. This is potential useful for verifying
+# reproducible builds for final releases
+PROJECT_VERSION=$(cat VERSION)
if [[ ! $PRE_RELEASE_LABEL =~ ^[\s]*$ ]]
then
RELEASE_VERSION=$PROJECT_VERSION-$PRE_RELEASE_LABEL