Files
vienna-rss/Scripts/ArchivalChecks.sh
T
Eitot 21360e2619 Use $PROJECT_DERIVED_FILE_DIR instead of $OBJROOT
$PROJECT_DERIVED_FILE_DIR is a more specific directory than $OBJROOT; the folder is located within the Vienna.build folder.
2025-06-27 19:57:35 +03:00

27 lines
733 B
Bash
Executable File

#!/bin/sh
. "${PROJECT_DERIVED_FILE_DIR}/autorevision.cache"
# Fail if not deployment
if [ ! "${CONFIGURATION}" = "Deployment" ]; then
echo "error: This should only be run as Deployment" >&2
exit 1
fi
# Fail if not clean
if [ ! "${VCS_WC_MODIFIED}" == "0" ]; then
echo 'error: The Working directory is not clean; please commit or revert any changes.' 1>&2
exit 1
fi
# Fail if not tagged
if [[ ! "${VCS_TICK}" == "0" ]]; then
echo 'error: Not on a tag; please make a tag tag with `git tag -s` or `git tag -a`.' 1>&2
exit 1
fi
# Fail if incorrectly tagged
if ! git describe --exact-match "${VCS_TAG}"; then
echo 'error: The tag is not annotated; please redo the tag with `git tag -s` or `git tag -a`.' 1>&2
exit 1
fi
exit 0