Add contrib/post-release.sh to help with post-release tasks

This commit is contained in:
Jérémy Lecour 2024-05-15 14:13:40 +02:00 committed by Jérémy Lecour
parent f1686874f6
commit 467ea511bc
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY
2 changed files with 48 additions and 0 deletions

View file

@ -5,6 +5,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
### Added
* Add contrib/post-release.sh to help with post-release tasks
### Changed
### Deprecated

46
contrib/post-release.sh Executable file
View file

@ -0,0 +1,46 @@
#!/bin/bash
#######################################################################
# Post-release script
#
# It must me executed after a release,
# to copy parts to the correct downstream projects.
#######################################################################
# Exit immediately if a pipeline (which may consist of a single simple command),
# a list, or a compound command (see SHELL GRAMMAR above), exits with a non-zero
# status.
set -o errexit
# If expansion is attempted on an unset variable or parameter, the shell prints an
# error message, and, if not interactive, exits with a non-zero status.
set -o nounset
# The pipeline's return status is the value of the last (rightmost) command
# to exit with a non-zero status, or zero if all commands exit successfully.
set -o pipefail
# Enable trace mode if called with environment variable TRACE=1
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
REPOSITORIES_PARENT_DIR="${HOME}/GIT"
echo "Copy to ansible-roles.git :"
dest="${REPOSITORIES_PARENT_DIR}/ansible-roles/evomaintenance/files/upstream"
if [ ! -d "${dest}" ]; then
echo "Target doesn't look like an evomaintenance upstream directory. Check before running again."
else
cp CHANGELOG.md README.md evomaintenance.sh "${dest}/" && echo "Done!"
fi
echo "Copy to EvoBSD.git :"
dest="${REPOSITORIES_PARENT_DIR}/EvoBSD/roles/evomaintenance/files/upstream"
if [ ! -d "${dest}" ]; then
echo "Target doesn't look like an evomaintenance upstream directory. Check before running again."
else
cp CHANGELOG.md README.md evomaintenance.sh "${dest}/" && echo "Done!"
fi