2 Star 1 Fork 0

mirrors_graphql-java-kickstart/graphql-spring-webclient

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
github-build.sh 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
set -ev
getVersion() {
./gradlew properties -q | grep "version:" | grep -v "kotlin_version:" | awk '{print $2}' | tr -d '[:space:]'
}
removeSnapshots() {
sed -i 's/-SNAPSHOT//' gradle.properties
}
commitRelease() {
local APP_VERSION=$(getVersion)
git commit -a -m "Update version for release"
git tag -a "v${APP_VERSION}" -m "Tag release version"
}
bumpVersion() {
echo "Bump version number"
local APP_VERSION=$(getVersion | xargs)
local SEMANTIC_REGEX='^([0-9]+)\.([0-9]+)(\.([0-9]+))?$'
if [[ ${APP_VERSION} =~ ${SEMANTIC_REGEX} ]]; then
if [[ ${BASH_REMATCH[4]} ]]; then
nextVersion=$((BASH_REMATCH[4] + 1))
nextVersion="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${nextVersion}-SNAPSHOT"
else
nextVersion=$((BASH_REMATCH[2] + 1))
nextVersion="${BASH_REMATCH[1]}.${nextVersion}-SNAPSHOT"
fi
echo "Next version: ${nextVersion}"
sed -i -E "s/^version(\s)?=.*/version=${nextVersion}/" gradle.properties
else
echo "No semantic version and therefore cannot publish to maven repository: '${APP_VERSION}'"
fi
}
commitNextVersion() {
git commit -a -m "Update version for release"
}
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
echo "Deploying release to Maven Central"
removeSnapshots
./gradlew clean build publishToSonatype closeAndReleaseSonatypeStagingRepository
commitRelease
bumpVersion
commitNextVersion
git push --follow-tags
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_graphql-java-kickstart/graphql-spring-webclient.git
git@gitee.com:mirrors_graphql-java-kickstart/graphql-spring-webclient.git
mirrors_graphql-java-kickstart
graphql-spring-webclient
graphql-spring-webclient
master

搜索帮助