Skip to content

Commit

Permalink
Merge pull request #2619 from dotty-staging/topic/add-release-to-CI
Browse files Browse the repository at this point in the history
Add release job to CI
  • Loading branch information
felixmulder authored May 30, 2017
2 parents 9366528 + 230bf91 commit 05aeeb5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
13 changes: 12 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,24 @@ pipeline:
commands:
- ./project/scripts/sbt ";clean ;publishLocal" "${CI_PUBLISH}"
- ./project/scripts/sbt "sbt-dotty/scripted source-dependencies/*" "${CI_PUBLISH}"
- ./project/scripts/sbtPublish ${CI_PUBLISH} $SONATYPE_USER $SONATYPE_PW $PGP_PW
- NIGHTLYBUILD="yes" ./project/scripts/sbtPublish ${CI_PUBLISH} $SONATYPE_USER $SONATYPE_PW $PGP_PW
volumes:
- /home/drone/keys:/keys
when:
event: deployment
environment: nightly

publish_release:
image: lampepfl/dotty:24-04-2017
pull: true
commands:
- RELEASEBUILD="yes" ./project/scripts/sbtPublish ${CI_PUBLISH} $SONATYPE_USER $SONATYPE_PW $PGP_PW
volumes:
- /home/drone/keys:/keys
when:
event: deployment
environment: release

documentation:
image: lampepfl/dotty:24-04-2017
pull: true
Expand Down
2 changes: 1 addition & 1 deletion .drone.yml.sig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eyJhbGciOiJIUzI1NiJ9.IyBBZnRlciB1cGRhdGluZyB0aGlzIGZpbGUsIHlvdSBuZWVkIHRvIHJlLXNpZ24gaXQ6CiMKIyAtIEluc3RhbGwgW2Ryb25lLWNsaV0oaHR0cDovL3JlYWRtZS5kcm9uZS5pby91c2FnZS9nZXR0aW5nLXN0YXJ0ZWQtY2xpLykKIyAtIENvcHkgeW91ciB0b2tlbiBmcm9tICBodHRwOi8vZG90dHktY2kuZXBmbC5jaC9hY2NvdW50IChDbGljayBTSE9XIFRPS0VOKQojIC0gKGV4cG9ydCBEUk9ORV9UT0tFTj15b3VyLXRva2VuOy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WRvdHR5LyoKICAgICAgQ0lfUFVCTElTSDogZmFsc2UKICAgIC0gQ0lfVEVTVDogZG90dHktYm9vdHN0cmFwcGVkL3Rlc3QKICAgICAgQ0lfUFVCTElTSDogZmFsc2UK.7RkUdpZM6WNINpEX2-CJuDCD5Gd_EIzMDWe8R9YLO0s
5 changes: 4 additions & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ object Build {
val dottyOrganization = "ch.epfl.lamp"
val dottyGithubUrl = "https://github.com/lampepfl/dotty"
val dottyVersion = {
val baseVersion = "0.1.1"
val baseVersion = "0.1.2-RC1"
val isNightly = sys.env.get("NIGHTLYBUILD") == Some("yes")
val isRelease = sys.env.get("RELEASEBUILD") == Some("yes")
if (isNightly)
baseVersion + "-bin-" + VersionUtil.commitDate + "-" + VersionUtil.gitHash + "-NIGHTLY"
else if (isRelease)
baseVersion
else
baseVersion + "-bin-SNAPSHOT"
}
Expand Down
6 changes: 5 additions & 1 deletion project/scripts/sbtPublish
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ if [ -z "$2" -o -z "$3" -o -z "$4" ]; then
exit 1
fi

if [ ! "$NIGHTLYBUILD" = "yes" ] && [ ! "$RELEASEBUILD" = "yes" ]; then
echo "Neither NIGHTLYBUILD or RELEASEBUILD env var set to \"yes\""
exit 1
fi

CMD=" ;set credentials in ThisBuild := Seq(Credentials(\"Sonatype Nexus Repository Manager\", \"oss.sonatype.org\", \"$2\", \"$3\"))"
CMD="$CMD ;set pgpPassphrase := Some(\"\"\"$4\"\"\".toCharArray)"
CMD="$CMD ;set pgpSecretRing := file(\"/keys/secring.asc\")"
CMD="$CMD ;set pgpPublicRing := file(\"/keys/pubring.asc\")"
CMD="$CMD ;dotty-bootstrapped/publishSigned ;sonatypeRelease"

export NIGHTLYBUILD="yes"
sbt -J-Xmx4096m \
-J-XX:ReservedCodeCacheSize=512m \
-J-XX:MaxMetaspaceSize=1024m \
Expand Down

0 comments on commit 05aeeb5

Please sign in to comment.