|
1 | | -import Common.{betaVersion, snapshotVersion, stableVersion} |
| 1 | +import Common.{betaVersion, snapshotVersion, stableVersion, versionUsage} |
2 | 2 |
|
3 | 3 | version in Rpm := { |
4 | 4 | version.value match { |
5 | | - case stableVersion(v1, v2) => v1 |
6 | | - case betaVersion(v1, v2) => v1 |
7 | | - case snapshotVersion(v1, v2) => v1 |
8 | | - case _ => sys.error("Invalid version: " + version.value) |
| 5 | + case stableVersion(v1, _) => v1 |
| 6 | + case betaVersion(v1, _, _) => v1 |
| 7 | + case snapshotVersion(stableVersion(v1, _)) => v1 |
| 8 | + case snapshotVersion(betaVersion(v1, _, _)) => v1 |
| 9 | + case _ => versionUsage(version.value) |
9 | 10 | } |
10 | 11 | } |
11 | 12 | rpmRelease := { |
12 | 13 | version.value match { |
13 | | - case stableVersion(_, v2) => v2 |
14 | | - case betaVersion(v1, v2) => "0.1RC" + v2 |
15 | | - case snapshotVersion(v1, v2) => v2 + "-SNAPSHOT" |
16 | | - case _ => sys.error("Invalid version: " + version.value) |
| 14 | + case stableVersion(_, v2) => v2 |
| 15 | + case betaVersion(_, v2, v3) => "0." + v3 + "RC" + v2 |
| 16 | + case snapshotVersion(stableVersion(_, v2)) => v2 + "-SNAPSHOT" |
| 17 | + case snapshotVersion(betaVersion(_, v2, v3)) => "0." + v3 + "RC" + v2 + "-SNAPSHOT" |
| 18 | + case _ => versionUsage(version.value) |
17 | 19 | } |
18 | 20 | } |
| 21 | + |
19 | 22 | rpmVendor := organizationName.value |
20 | 23 | rpmUrl := organizationHomepage.value.map(_.toString) |
21 | 24 | rpmLicense := Some("AGPL") |
|
0 commit comments