1 Star 0 Fork 1

随风飘_DCL/UsbSerial

forked from sshongliang/UsbSerial 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
release.sh 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
Felipe Herranz 提交于 2019-03-09 21:46 . release 6.0.4
#!/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!!!"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/SenCheng/UsbSerial.git
git@gitee.com:SenCheng/UsbSerial.git
SenCheng
UsbSerial
UsbSerial
master

搜索帮助