mirror of https://github.com/sbt/sbt.git
Merge pull request #1499 from sbt/wip/fix-nightly-push
Fix nightly push to go to snapshot repository.
This commit is contained in:
commit
9b42c8cd1c
|
|
@ -34,7 +34,7 @@ object Release extends Build {
|
||||||
) ++ lameCredentialSettings ++ javaVersionCheckSettings
|
) ++ lameCredentialSettings ++ javaVersionCheckSettings
|
||||||
|
|
||||||
def snapshotPattern(version: String) = Resolver.localBasePattern.replaceAll("""\[revision\]""", version)
|
def snapshotPattern(version: String) = Resolver.localBasePattern.replaceAll("""\[revision\]""", version)
|
||||||
def publishResolver: Project.Initialize[Option[Resolver]] = (remoteID, remoteBase) { (id, base) =>
|
def publishResolver: Def.Initialize[Option[Resolver]] = (remoteID, remoteBase) { (id, base) =>
|
||||||
Some(Resolver.url("publish-" + id, url(base))(Resolver.ivyStylePatterns))
|
Some(Resolver.url("publish-" + id, url(base))(Resolver.ivyStylePatterns))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,15 @@ object Status {
|
||||||
commands += stampVersion
|
commands += stampVersion
|
||||||
)
|
)
|
||||||
def stampVersion = Command.command("stamp-version") { state =>
|
def stampVersion = Command.command("stamp-version") { state =>
|
||||||
Project.extract(state).append((version in ThisBuild ~= stamp) :: Nil, state)
|
val extracted = Project.extract(state)
|
||||||
|
val status = extracted.get(publishStatus)
|
||||||
|
// Set new version AND lock down the publishStatus to what it was, as
|
||||||
|
// our release regexes no longer support ivy data format, due to other issues.
|
||||||
|
extracted.append(
|
||||||
|
(version in ThisBuild ~= stamp) ::
|
||||||
|
(publishStatus in ThisBuild := status) ::
|
||||||
|
Nil,
|
||||||
|
state)
|
||||||
}
|
}
|
||||||
def stamp(v: String): String =
|
def stamp(v: String): String =
|
||||||
if (v endsWith Snapshot)
|
if (v endsWith Snapshot)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue