| skipped 87 lines |
88 | 88 | | <image>1dev/build-environment:1.0</image> |
89 | 89 | | <commands> |
90 | 90 | | <string>set -e</string> |
91 | | - | <string>rm -rf ~/.m2/repository/io/onedev #clean downloaded dependencies as sometimes we do not change project versions</string> |
92 | | - | <string>echo "Detecting project version (may require some time while downloading maven dependencies)..."</string> |
93 | | - | <string>tag=v$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)</string> |
94 | | - | <string>git config --global user.name "Robin Shen"</string> |
95 | | - | <string>git config --global user.email "robin\@pmease.com"</string> |
96 | | - | <string>git tag -a $tag -m "Release"</string> |
97 | | - | <string>url=https://robinshine:@secrets:github-password@\@github.com/theonedev/onedev</string> |
98 | | - | <string>git push -f $url $tag:$tag</string> |
| 91 | + | <string>git fetch --tags</string> |
| 92 | + | <string>git push -f --tags https://robinshine:@secrets:github-password@\@github.com/theonedev/onedev</string> |
99 | 93 | | </commands> |
100 | 94 | | <retrieveSource>true</retrieveSource> |
101 | 95 | | <submoduleCredentials/> |
| skipped 27 lines |