Changeset View
Changeset View
Standalone View
Standalone View
contrib/source-control-tools/automated-commits.sh
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | archive-release-notes) | ||||
# Generate a fresh blank release notes file for the new version | # Generate a fresh blank release notes file for the new version | ||||
PROJECT_VERSION="${CURRENT_VERSION}" envsubst < "${TOPLEVEL}/doc/release-notes/release-notes.md.in" > "${RELEASE_NOTES_FILE}" | PROJECT_VERSION="${CURRENT_VERSION}" envsubst < "${TOPLEVEL}/doc/release-notes/release-notes.md.in" > "${RELEASE_NOTES_FILE}" | ||||
git add "${RELEASE_NOTES_FILE}" "${RELEASE_NOTES_ARCHIVE}" | git add "${RELEASE_NOTES_FILE}" "${RELEASE_NOTES_ARCHIVE}" | ||||
git commit -m "${BOT_PREFIX} Archive release notes for version ${RELEASE_NOTES_VERSION}" | git commit -m "${BOT_PREFIX} Archive release notes for version ${RELEASE_NOTES_VERSION}" | ||||
;; | ;; | ||||
update-timings) | |||||
"${DEVTOOLS_DIR}"/build_cmake.sh | |||||
pushd "${BUILD_DIR}" | |||||
ninja check-functional-extended | |||||
TIMING_SRC_FILE="${TOPLEVEL}"/test/functional/timing.json | |||||
mv timing.json "${TIMING_SRC_FILE}" | |||||
popd | |||||
# Check that all tests are included in timing.json | |||||
pushd "${TOPLEVEL}"/test/functional | |||||
NON_TESTS=$(python3 -c 'from test_runner import NON_SCRIPTS; print(" ".join(NON_SCRIPTS))') | |||||
export NON_TESTS | |||||
check_missing() { | |||||
# Exclude non-tests from the check | |||||
if [[ "${NON_TESTS}" =~ $1 ]]; then | |||||
exit 0 | |||||
fi | |||||
if ! grep -q $1 timing.json ; then | |||||
echo "Error: Test file '$1' is missing from timing.json" | |||||
exit 1 | |||||
fi | |||||
} | |||||
export -f check_missing | |||||
find . -maxdepth 1 -name '*.py' | cut -c 3- | xargs -I'{}' -n1 bash -c 'check_missing {}' | |||||
popd | |||||
git add "${TIMING_SRC_FILE}" | |||||
git commit -m "${BOT_PREFIX} Update timing.json" | |||||
;; | |||||
*) | *) | ||||
if [ -z "${SCRIPT}" ]; then | if [ -z "${SCRIPT}" ]; then | ||||
echo "Error: Invalid commit name '${COMMIT_TYPE}'" | echo "Error: Invalid commit name '${COMMIT_TYPE}'" | ||||
exit 10 | exit 10 | ||||
fi | fi | ||||
if [ ! -f "${SCRIPT}" ]; then | if [ ! -f "${SCRIPT}" ]; then | ||||
echo "Error: '${SCRIPT}' does not exist" | echo "Error: '${SCRIPT}' does not exist" | ||||
Show All 15 Lines |