|
14 | 14 |
|
15 | 15 | # Specifying the Scala version:
|
16 | 16 | # - To build a release (this enables publishing to sonatype):
|
17 |
| -# - Either specify SCALA_VER_BASE. You may also specify SCALA_VER_SUFFIX, the Scala version is SCALA_VER=$SCALA_VER_BASE$SCALA_VER_SUFFIX. |
18 |
| -# - Or have the current HEAD tagged as v$base$suffix |
19 |
| -# - To prevent staging on sonatype (for testing), set publishToSonatype to anything but "yes" |
| 17 | +# - Specify SCALA_VER_BASE. You may also specify SCALA_VER_SUFFIX, the Scala version is SCALA_VER=$SCALA_VER_BASE$SCALA_VER_SUFFIX. |
20 | 18 | # - Note: After building a release, the jenkins job provides an updated versions.properties file as artifact.
|
21 | 19 | # Put this file in the Scala repo and create a pull request, also update `baseVersion in Global` in build.sbt.
|
22 | 20 | #
|
@@ -285,31 +283,11 @@ determineScalaVersion() {
|
285 | 283 | if [ -z "$SCALA_VER_BASE" ]; then
|
286 | 284 | echo "No SCALA_VER_BASE specified."
|
287 | 285 |
|
288 |
| - scalaTag=$(git describe --tag --exact-match ||:) |
289 |
| - |
290 |
| - if [ -z "$scalaTag" ] |
291 |
| - then |
292 |
| - echo "No tag found, running an integration build." |
293 |
| - $SBT_CMD $sbtArgs 'set baseVersionSuffix in Global := "SHA"' generateBuildCharacterPropertiesFile |
294 |
| - parseScalaProperties "buildcharacter.properties" |
295 |
| - SCALA_VER_BASE="$maven_version_base" |
296 |
| - SCALA_VER_SUFFIX="$maven_version_suffix" |
297 |
| - |
298 |
| - # TODO: publish nightly snapshot using this script - currently it's a separate jenkins job still running at EPFL. |
299 |
| - publishToSonatype="no" |
300 |
| - else |
301 |
| - echo "HEAD is tagged as $scalaTag." |
302 |
| - # borrowed from https://github.com/cloudflare/semver_bash/blob/master/semver.sh |
303 |
| - local RE='v*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)' # don't change this to make it more accurate, it's not worth it |
304 |
| - SCALA_VER_BASE="$(echo $scalaTag | sed -e "s#$RE#\1.\2.\3#")" |
305 |
| - SCALA_VER_SUFFIX="$(echo $scalaTag | sed -e "s#$RE#\4#")" |
306 |
| - |
307 |
| - if [ "$SCALA_VER_BASE" == "$scalaTag" ]; then |
308 |
| - echo "Could not parse version $scalaTag" |
309 |
| - exit 1 |
310 |
| - fi |
311 |
| - publishToSonatype=${publishToSonatype-"yes"} # unless forced previously, publish |
312 |
| - fi |
| 286 | + $SBT_CMD $sbtArgs 'set baseVersionSuffix in Global := "SHA"' generateBuildCharacterPropertiesFile |
| 287 | + parseScalaProperties "buildcharacter.properties" |
| 288 | + SCALA_VER_BASE="$maven_version_base" |
| 289 | + SCALA_VER_SUFFIX="$maven_version_suffix" |
| 290 | + publishToSonatype="no" |
313 | 291 | else
|
314 | 292 | publishToSonatype=${publishToSonatype-"yes"} # unless forced previously, publish
|
315 | 293 | fi
|
|
0 commit comments