Merge pull request #1499 from sbt/wip/fix-nightly-push

Fix nightly push to go to snapshot repository.
This commit is contained in:
eugene yokota 2014-08-04 11:24:47 -04:00
commit 9b42c8cd1c
2 changed files with 10 additions and 2 deletions

View File

@ -34,7 +34,7 @@ object Release extends Build {
) ++ lameCredentialSettings ++ javaVersionCheckSettings
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))
}

View File

@ -11,7 +11,15 @@ object Status {
commands += stampVersion
)
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 =
if (v endsWith Snapshot)