代码拉取完成,页面将自动刷新
同步操作将从 sshongliang/UsbSerial 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
#Arguments:
# -v version eg 6.0.3
# -m 6.0.3
set -e
while getopts v:m: OPTION;
do
case $OPTION
in
v) VERSION=$OPTARG;;
m) MESSAGE=$OPTARG;;
esac
done
# Show error message if no version was provided
if [[ -z ${VERSION} ]];
then
echo "UsbSerial: Error!! No version was provided"
exit 0
fi
# Show error message if no message was provided
if [[ -z ${MESSAGE} ]];
then
echo "UsbSerial: Error!! No message was provided"
exit 0
fi
echo "UsbSerial: Starting Release $VERSION with commit message $MESSAGE"
VERSION_NAME="VERSION_NAME=$VERSION"
# Updating gradle.properties with version
ex -sc '1d|x' gradle.properties
ex -sc "1i|$VERSION_NAME" -cx gradle.properties
# Updating README file
GRADLE_LINE="implementation 'com.github.felHR85:UsbSerial:${VERSION}'"
LINE=$(cat README.md | grep -nr implementation\ \'com.github.felHR85:UsbSerial: | awk -F ":" '{print $2}')
ex -sc "${LINE}d|x" README.md
ex -sc "${LINE}i|$GRADLE_LINE" -cx README.md
# Gradle clean and build
./gradlew clean build
# Git stuff
git add .
git commit -m "${MESSAGE}"
git tag ${VERSION}
git push origin master
git push --tags
echo "UsbSerial: Release Finished!!!"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。