Merge pull request #715 from coursier/topic/fix-build-1.0

Update version numbers in CI scripts after 1.0.0 release
This commit is contained in:
Alexandre Archambault 2017-12-18 12:44:40 +01:00 committed by GitHub
commit b21042a42a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 9 deletions

View File

@ -1,5 +1,5 @@
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.nio.file.{Files, Paths}
import java.util.regex.Pattern
import com.typesafe.sbt.pgp.PgpKeys
@ -281,6 +281,35 @@ object Release {
state
}
val updateTestFixture = ReleaseStep(
action = { state =>
val initialVer = state.get(initialVersion).getOrElse {
sys.error(s"${initialVersion.label} key not set")
}
val (_, nextVer) = state.get(ReleaseKeys.versions).getOrElse {
sys.error(s"${ReleaseKeys.versions.label} key not set")
}
if (initialVer == nextVer)
state
else {
val vcs = state.vcs
val log = toProcessLogger(state)
val originalFile = Paths.get(s"tests/shared/src/test/resources/resolutions/io.get-coursier/coursier_2.11/$initialVer")
val originalContent = new String(Files.readAllBytes(originalFile), StandardCharsets.UTF_8)
val destFile = Paths.get(s"tests/shared/src/test/resources/resolutions/io.get-coursier/coursier_2.11/$nextVer")
val destContent = originalContent.replace(initialVer, nextVer)
log.out(s"Writing $destFile")
Files.write(destFile, destContent.getBytes(StandardCharsets.UTF_8))
vcs.add(destFile.toAbsolutePath.toString).!!(log)
vcs.cmd("rm", originalFile.toAbsolutePath.toString).!!(log)
state
}
}
)
val commitUpdates = ReleaseStep(
action = { state =>
@ -367,6 +396,7 @@ object Release {
stageReadme,
updatePluginsSbt,
updateMimaVersions,
updateTestFixture,
commitUpdates,
reallyTagRelease,
setNextVersion,

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
VERSION="${VERSION:-1.0.0-SNAPSHOT}"
VERSION="1.0.0"
cd "$(dirname "$0")/.."

View File

@ -1,3 +1,3 @@
# see https://stackoverflow.com/questions/2224350/powershell-start-job-working-directory/2246542#2246542
Set-Location $args[0]
& java -jar -noverify coursier launch io.get-coursier:http-server_2.12:1.0.0-SNAPSHOT -- -d tests/jvm/src/test/resources/test-repo/http/abc.com -u user -P pass -r realm --port 8080 --list-pages -v
& java -jar -noverify coursier launch io.get-coursier:http-server_2.12:1.0.0 -- -d tests/jvm/src/test/resources/test-repo/http/abc.com -u user -P pass -r realm --port 8080 --list-pages -v

View File

@ -1,3 +1,3 @@
# see https://stackoverflow.com/questions/2224350/powershell-start-job-working-directory/2246542#2246542
Set-Location $args[0]
& java -jar -noverify coursier launch io.get-coursier:http-server_2.12:1.0.0-SNAPSHOT -- -d tests/jvm/src/test/resources/test-repo/http/abc.com -u user -P pass -r realm --port 8081 -v
& java -jar -noverify coursier launch io.get-coursier:http-server_2.12:1.0.0 -- -d tests/jvm/src/test/resources/test-repo/http/abc.com -u user -P pass -r realm --port 8081 -v

View File

@ -7,6 +7,8 @@ BRANCH="${BRANCH:-${TRAVIS_BRANCH:-$(git rev-parse --abbrev-ref HEAD)}}"
PUBLISH="${PUBLISH:-0}"
SCALA_JS="${SCALA_JS:-0}"
VERSION="$(grep -oP '(?<=")[^"]*(?!<")' < version.sbt)"
JARJAR_VERSION="${JARJAR_VERSION:-1.0.1-coursier-SNAPSHOT}"
is210() {
@ -183,7 +185,7 @@ testSbtCoursierJava6() {
mkdir -p foo/project
cd foo
echo 'libraryDependencies += "foo" % "bar" % "1.0"' >> build.sbt
echo 'addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-SNAPSHOT")' >> project/plugins.sbt
echo 'addSbtPlugin("io.get-coursier" % "sbt-coursier" % "'"$VERSION"'")' >> project/plugins.sbt
echo 'sbt.version=0.13.15' >> project/build.properties
docker run -it --rm \
-v $HOME/.ivy2/local:/root/.ivy2/local \
@ -201,7 +203,7 @@ clean_plugin_sbt() {
mv plugins.sbt plugins.sbt0
grep -v coursier plugins.sbt0 > plugins.sbt || true
echo '
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-SNAPSHOT")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "'"$VERSION"'")
' >> plugins.sbt
}
@ -212,7 +214,7 @@ publish() {
testBootstrap() {
if is211; then
sbt ++${SCALA_VERSION} echo/publishLocal "project cli" pack
cli/target/pack/bin/coursier bootstrap -o cs-echo io.get-coursier:echo:1.0.0-SNAPSHOT
cli/target/pack/bin/coursier bootstrap -o cs-echo io.get-coursier:echo:1.0.0
if [ "$(./cs-echo foo)" != foo ]; then
echo "Error: unexpected output from bootstrapped echo command." 1>&2
exit 1

View File

@ -1,4 +1,4 @@
io.get-coursier:coursier_2.11:1.0.0-SNAPSHOT:compile
io.get-coursier:coursier_2.11:1.0.1-SNAPSHOT:compile
org.scala-lang:scala-library:2.11.11:default
org.scala-lang.modules:scala-xml_2.11:1.0.6:default
org.scalaz:scalaz-core_2.11:7.2.16:default
org.scalaz:scalaz-core_2.11:7.2.16:default