use sbt-dynver (#27042)
This commit is contained in:
parent
b5576870fc
commit
3a35851fef
4 changed files with 19 additions and 11 deletions
|
|
@ -54,7 +54,7 @@ Make sure you have completed the setup in `project/scripts/release`.
|
|||
Nightly snapshot releases are created from master and published to
|
||||
https://repo.akka.io/snapshots by https://jenkins.akka.io:8498/job/akka-publish-nightly/
|
||||
|
||||
To create snapshot versions manually, use `sbt clean stampVersion publish`.
|
||||
To create snapshot versions manually, use `sbt clean publish`.
|
||||
The release artifacts are created in `akka-*/target/repository` and can be
|
||||
copied over to a maven server. If you have access, the Jenkins job at
|
||||
https://jenkins.akka.io:8498/job/akka-publish-wip/ can be used to publish
|
||||
|
|
|
|||
|
|
@ -29,8 +29,12 @@ object AkkaBuild {
|
|||
organization := "com.typesafe.akka",
|
||||
Dependencies.Versions,
|
||||
// use the same value as in the build scope
|
||||
// TODO #26675 this can be removed once we use sbt-dynver instead of timestamps
|
||||
// everywhere
|
||||
version := (version in ThisBuild).value)
|
||||
|
||||
// TODO #26675 this can be removed once we use sbt-dynver instead of timestamps
|
||||
// everywhere
|
||||
lazy val currentDateTime = {
|
||||
// storing the first accessed timestamp in system property so that it will be the
|
||||
// same when build is reloaded or when using `+`.
|
||||
|
|
@ -41,6 +45,8 @@ object AkkaBuild {
|
|||
.format(ZonedDateTime.now(ZoneOffset.UTC)))
|
||||
}
|
||||
|
||||
// TODO #26675 this can be removed once we use sbt-dynver instead of timestamps
|
||||
// everywhere
|
||||
def akkaVersion: String = {
|
||||
val default = "2.6-SNAPSHOT"
|
||||
sys.props.getOrElse("akka.build.version", default) match {
|
||||
|
|
@ -50,6 +56,8 @@ object AkkaBuild {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO #26675 this can be removed once we use sbt-dynver instead of timestamps
|
||||
// everywhere
|
||||
def akkaVersionFromFile(default: String): String = {
|
||||
val versionFile = "akka-actor/target/classes/version.conf"
|
||||
if (new File(versionFile).exists()) {
|
||||
|
|
@ -66,7 +74,6 @@ object AkkaBuild {
|
|||
UnidocRoot.akkaSettings,
|
||||
Protobuf.settings,
|
||||
parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", parallelExecutionByDefault.toString).toBoolean,
|
||||
version in ThisBuild := akkaVersion,
|
||||
// used for linking to API docs (overwrites `project-info.version`)
|
||||
ThisBuild / projectInfoVersion := { if (isSnapshot.value) "snapshot" else version.value }
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,3 +24,4 @@ addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.18")
|
|||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.3.1") // for maintenance of copyright file header
|
||||
addSbtPlugin("com.hpe.sbt" % "sbt-pull-request-validator" % "1.0.0")
|
||||
addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.22")
|
||||
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0")
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ declare -r current_version=$(get_current_version)
|
|||
echolog "Current version is ${current_version}"
|
||||
|
||||
if [ "${current_version:0:3}" != "${version:0:3}" ]; then
|
||||
fail "Releasing $version from wrong with version $current_version"
|
||||
fail "Releasing $version from wrong branch with version $current_version"
|
||||
fi
|
||||
|
||||
# start clean
|
||||
|
|
@ -267,29 +267,29 @@ fi
|
|||
# build the release
|
||||
echolog "Building the release..."
|
||||
if [ ! $dry_run ]; then
|
||||
RELEASE_OPT="-Dakka.build.version=${version} -Dakka.genjavadoc.enabled=true -Dpublish.maven.central=true"
|
||||
RELEASE_OPT="-Dakka.genjavadoc.enabled=true -Dpublish.maven.central=true"
|
||||
else
|
||||
RELEASE_OPT="-Dakka.build.version=${version} -Dakka.genjavadoc.enabled=true"
|
||||
RELEASE_OPT="-Dakka.genjavadoc.enabled=true"
|
||||
fi
|
||||
|
||||
try sbt $RELEASE_OPT +buildRelease
|
||||
# tag this release
|
||||
echolog "Tagging..."
|
||||
try git tag -am "Version ${version}" v${version}
|
||||
|
||||
try sbt $RELEASE_OPT +buildRelease
|
||||
try sbt $RELEASE_OPT buildDocs
|
||||
|
||||
echolog "Successfully created local release"
|
||||
|
||||
# check binary compatibility for dry run
|
||||
if [ ! $no_mima ] && [ $dry_run ]; then
|
||||
echodry "Running migration manager report..."
|
||||
sbt $RELEASE_OPT +mimaReportBinaryIssues
|
||||
try sbt $RELEASE_OPT +mimaReportBinaryIssues
|
||||
echodry "Finished migration manager report"
|
||||
fi
|
||||
|
||||
try sbt $RELEASE_OPT whitesourceCheckPolicies
|
||||
|
||||
# commit and tag this release
|
||||
echolog "Tagging..."
|
||||
try git tag -am "Version ${version}" v${version}
|
||||
|
||||
# the point of no return... we're now pushing out to servers
|
||||
|
||||
# use a special failure from now on
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue