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

Add additional consistency checks to CITATION.cff for releases #1141

Merged
merged 2 commits into from
May 21, 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
18 changes: 18 additions & 0 deletions scripts/roll_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ VERSION_FULL="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
VERSION_FULL_TAG="v${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
VERSION_TITLE="DLA-Future ${VERSION_FULL}"
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
RELEASE_DATE=$(date '+%Y-%m-%d')

if ! which hub >/dev/null 2>&1; then
echo "Hub not installed on this system (see https://hub.github.com/). Exiting."
Expand Down Expand Up @@ -76,6 +77,22 @@ else
sanity_errors=$((sanity_errors + 1))
fi

printf "Checking that %s has correct title for %s... " "${cff_path}" "${VERSION_FULL}"
if grep "^title: ${VERSION_TITLE}" "${cff_path}"; then
echo "OK"
else
echo "Missing"
sanity_errors=$((sanity_errors + 1))
fi

printf "Checking that %s has today's date... " "${cff_path}"
if grep "^date-released: '${RELEASE_DATE}'" "${cff_path}"; then
echo "OK"
else
echo "Missing"
sanity_errors=$((sanity_errors + 1))
fi

if [[ ${sanity_errors} -gt 0 ]]; then
echo "Found ${sanity_errors} error(s). Fix it/them and try again."
exit 1
Expand All @@ -97,6 +114,7 @@ VERSION_DESCRIPTION=$(
echo ""
echo "The version is: ${VERSION_FULL}"
echo "The version title is: ${VERSION_TITLE}"
echo "The release date is: ${RELEASE_DATE}"
echo "The version description is:"
echo "${VERSION_DESCRIPTION}"

Expand Down
Loading