mirror of
https://github.com/ironfox-oss/IronFox.git
synced 2026-07-31 01:46:33 -04:00
42 lines
1.1 KiB
Bash
42 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
# Script is used to update the ironfoxoss.org website repository.
|
|
# This script is not intended to be executed manually!
|
|
|
|
set -euo pipefail
|
|
|
|
# Set-up our environment
|
|
if [[ -z "${IRONFOX_CI+x}" ]]; then
|
|
export IRONFOX_CI=1
|
|
fi
|
|
if [[ -z "${IRONFOX_SET_ENVS+x}" ]]; then
|
|
/bin/bash "$(realpath $(dirname "$0"))/env.sh"
|
|
fi
|
|
source "$(realpath $(dirname "$0"))/env.sh"
|
|
|
|
# Set verbosity
|
|
if [[ "${IRONFOX_VERBOSE}" == 1 ]]; then
|
|
set -x
|
|
else
|
|
set +x
|
|
fi
|
|
|
|
"${IRONFOX_GIT}" clone "https://${IF_CI_USERNAME}:${GITLAB_CI_PUSH_TOKEN}@gitlab.com/${TARGET_REPO_PATH}.git" target-repo
|
|
cd target-repo || {
|
|
echo "Unable to cd into target-repo"
|
|
exit 1
|
|
}
|
|
|
|
# Generate documentation for patches
|
|
source "${IRONFOX_PYENV}"
|
|
"${IRONFOX_PYTHON}" ./scripts/gen_patch_pages.py ../scripts/patches.yaml
|
|
|
|
# Update version name
|
|
"${IRONFOX_SED}" -i "s/IRONFOX_VERSION = .*/IRONFOX_VERSION = \"${IRONFOX_VERSION}\";/g" \
|
|
./src/version.ts
|
|
|
|
# Commit changes
|
|
"${IRONFOX_GIT}" add src
|
|
"${IRONFOX_GIT}" commit -m "feat: update patch docs to reflect ironfox-oss/IronFox@${CI_COMMIT_SHA}"
|
|
"${IRONFOX_GIT}" push origin "HEAD:${TARGET_REPO_BRANCH}"
|