代码拉取完成,页面将自动刷新
同步操作将从 Kaiwenwang/miso-lims开源lims系统 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
set -euo pipefail
MAIN_BRANCH="develop"
# validate prerequisites
if [[ ! $(command -v gh) ]]; then
echo "Error: GitHub CLI not found"
exit 1
fi
# validate git state
if [[ ! $(git branch | grep \* | cut -d ' ' -f2) = "${MAIN_BRANCH}" ]]; then
echo "Error: Not on ${MAIN_BRANCH} branch" >&2
exit 2
fi
git fetch
if (( $(git log HEAD..origin/${MAIN_BRANCH} --oneline | wc -l) > 0 )); then
echo "Error: Branch is not up-to-date with remote origin" >&2
exit 3
fi
MISO_VERSION_OLD=$(git describe --tags --abbrev=0); export MISO_VERSION_OLD=${MISO_VERSION_OLD:1}
# Post official release to GitHub
git fetch --tags
git checkout tags/v${MISO_VERSION_OLD}
mvn clean package
pushd miso-web/src/main/resources
SETUP_FILES="setup_files.tar.gz"
tar -czf "../../../../${SETUP_FILES}" *.properties
popd
ANCHOR=$(grep "^## \[${MISO_VERSION_OLD}\]" RELEASE_NOTES.md | sed -e 's/ - /---/; s/[# \.\[]//g; s/\]//g')
gh release create v${MISO_VERSION_OLD} \
--notes "[Release Notes](https://github.com/miso-lims/miso-lims/blob/develop/RELEASE_NOTES.md#${ANCHOR})" \
miso-web/target/ROOT.war \
sqlstore/target/sqlstore-*.jar \
${SETUP_FILES}
rm ${SETUP_FILES}
echo "GitHub release v${MISO_VERSION_OLD} posted"
# Update master branch
git checkout master
git reset origin/master --hard
git rebase --onto v${MISO_VERSION_OLD} master
git push origin master
echo "Master branch updated"
echo "v${MISO_VERSION_OLD} promoted to latest official release. Copy this export into your shell before doing the Docker build:"
echo "export MISO_VERSION_OLD=${MISO_VERSION_OLD}"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。