mirror of https://github.com/sbt/sbt.git
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:
commit
b21042a42a
|
|
@ -1,5 +1,5 @@
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
import java.nio.file.Files
|
import java.nio.file.{Files, Paths}
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
import com.typesafe.sbt.pgp.PgpKeys
|
import com.typesafe.sbt.pgp.PgpKeys
|
||||||
|
|
@ -281,6 +281,35 @@ object Release {
|
||||||
state
|
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(
|
val commitUpdates = ReleaseStep(
|
||||||
action = { state =>
|
action = { state =>
|
||||||
|
|
||||||
|
|
@ -367,6 +396,7 @@ object Release {
|
||||||
stageReadme,
|
stageReadme,
|
||||||
updatePluginsSbt,
|
updatePluginsSbt,
|
||||||
updateMimaVersions,
|
updateMimaVersions,
|
||||||
|
updateTestFixture,
|
||||||
commitUpdates,
|
commitUpdates,
|
||||||
reallyTagRelease,
|
reallyTagRelease,
|
||||||
setNextVersion,
|
setNextVersion,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION="${VERSION:-1.0.0-SNAPSHOT}"
|
VERSION="1.0.0"
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
# see https://stackoverflow.com/questions/2224350/powershell-start-job-working-directory/2246542#2246542
|
# see https://stackoverflow.com/questions/2224350/powershell-start-job-working-directory/2246542#2246542
|
||||||
Set-Location $args[0]
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
# see https://stackoverflow.com/questions/2224350/powershell-start-job-working-directory/2246542#2246542
|
# see https://stackoverflow.com/questions/2224350/powershell-start-job-working-directory/2246542#2246542
|
||||||
Set-Location $args[0]
|
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
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ BRANCH="${BRANCH:-${TRAVIS_BRANCH:-$(git rev-parse --abbrev-ref HEAD)}}"
|
||||||
PUBLISH="${PUBLISH:-0}"
|
PUBLISH="${PUBLISH:-0}"
|
||||||
SCALA_JS="${SCALA_JS:-0}"
|
SCALA_JS="${SCALA_JS:-0}"
|
||||||
|
|
||||||
|
VERSION="$(grep -oP '(?<=")[^"]*(?!<")' < version.sbt)"
|
||||||
|
|
||||||
JARJAR_VERSION="${JARJAR_VERSION:-1.0.1-coursier-SNAPSHOT}"
|
JARJAR_VERSION="${JARJAR_VERSION:-1.0.1-coursier-SNAPSHOT}"
|
||||||
|
|
||||||
is210() {
|
is210() {
|
||||||
|
|
@ -183,7 +185,7 @@ testSbtCoursierJava6() {
|
||||||
mkdir -p foo/project
|
mkdir -p foo/project
|
||||||
cd foo
|
cd foo
|
||||||
echo 'libraryDependencies += "foo" % "bar" % "1.0"' >> build.sbt
|
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
|
echo 'sbt.version=0.13.15' >> project/build.properties
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
-v $HOME/.ivy2/local:/root/.ivy2/local \
|
-v $HOME/.ivy2/local:/root/.ivy2/local \
|
||||||
|
|
@ -201,7 +203,7 @@ clean_plugin_sbt() {
|
||||||
mv plugins.sbt plugins.sbt0
|
mv plugins.sbt plugins.sbt0
|
||||||
grep -v coursier plugins.sbt0 > plugins.sbt || true
|
grep -v coursier plugins.sbt0 > plugins.sbt || true
|
||||||
echo '
|
echo '
|
||||||
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-SNAPSHOT")
|
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "'"$VERSION"'")
|
||||||
' >> plugins.sbt
|
' >> plugins.sbt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -212,7 +214,7 @@ publish() {
|
||||||
testBootstrap() {
|
testBootstrap() {
|
||||||
if is211; then
|
if is211; then
|
||||||
sbt ++${SCALA_VERSION} echo/publishLocal "project cli" pack
|
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
|
if [ "$(./cs-echo foo)" != foo ]; then
|
||||||
echo "Error: unexpected output from bootstrapped echo command." 1>&2
|
echo "Error: unexpected output from bootstrapped echo command." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
|
|
@ -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:scala-library:2.11.11:default
|
||||||
org.scala-lang.modules:scala-xml_2.11:1.0.6: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
|
||||||
Loading…
Reference in New Issue