Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure: add check for valid version #6276

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,28 @@ AC_SUBST([AX_MAJOR_VERSION])
AC_SUBST([AX_MINOR_VERSION])
AC_SUBST([AX_POINT_VERSION])

AC_MSG_CHECKING([whether version number is sane])
AS_IF([printf "%d.%d.%d" ${AX_MAJOR_VERSION} ${AX_MINOR_VERSION} ${AX_POINT_VERSION} >/dev/null 2>&1], [
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
version_err_msg="
VERSION ${VERSION} is invalid.
Try the following to remedy this:

1. Run \`git fetch --tags\` before building. Versions in
flux-core are derived from \`git describe\` which uses
the most recent tag.
2. If you are running remote CI in a fork of the main repository,
try pushing the upstream tags to your fork with
\`git push --tags <your_remote>\` to make sure tags are
synchronized in your fork.
3. Set the variable manually, with FLUX_VERSION=<version>
in your environment.
"
AC_MSG_ERROR(["${version_err_msg}"])
])

##
# Initialize pkg-config for PKG_CHECK_MODULES to avoid conditional issues
##
Expand Down
Loading