-
Notifications
You must be signed in to change notification settings - Fork 9
[Internal] Releasing sscheck
Juan Rodriguez Hortala edited this page Oct 3, 2016
·
1 revision
See instructions at https://www.jfrog.com/open-source/#os-bin. It's free for open source projects, and [sbt is hosted there](ahi https://bintray.com/sbt)
There is a sbt plugin for bintray, that allows to publish artifacts from sbt projects. Following the instructions:
- sign up to bintray https://bintray.com/signup/index. Note you can login with your github account
- add
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
toproject/plugins.sbt
- check that sbt version is 0.13.8 or newer with
sbt sbtVersion
, and update if needed - start sbt and reload the project if needed to load the plugin. Now run
bintrayChangeCredentials
from sbt use the bintray API key that is located at profile -> edit after loigin in bintray. That creates a file at~/.bintray/.credentials
(in Windows that isC:\Users\juanrh\.bintray\.credentials
) - use
bintrayWhoami
to check the credentials are ok. See the plugin instructions for how to use a bintray organization - add a license adding
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
tobuild.sbt
. See plugin instructions for other licences - add labels adding
bintrayPackageLabels := Seq("testing")
tobuild.sbt
. I don't add Spark in case it is a trademark. See plugin instructions for adding other metadata - if the project is not already created in bintray, add
bintrayVcsUrl := Some("[email protected]:juanrh/sscheck.git")
tobuild.sbt
so bintray is able to import it from github. - edit the value of
version
atbuild.sbt
, as it will be used to generate the release at bintray. Note bintray doesn't accept version names like "0.2.1-SNAPSHOT", so use semantic versioning versions like "0.2.1". Also addorganization := "es.ucm.fdi"
- run
+publish
is sbt to publish to bin tray for all the version of Scala, or justpublish
for the version of Scala active in the sbt session (see below for changing this). A new package should be created at https://bintray.com/juanrh/maven/sscheck. Configure the web site and some details. - go to https://bintray.com/juanrh/maven/sscheck/view and in "Linked to" select "Add to JCenter". Use
es.ucm.fdi
as groupid for the project, and wait for an answer in your bintray inbox
Add the following to build.sbt
lazy val sscheckVersion = "0.2.0"
libraryDependencies += "es.ucm.fdi" %% "sscheck" % sscheckVersion
resolvers += Resolver.bintrayRepo("juanrh", "maven")
for a suitable value for sscheckVersion
.
For local development use SBT publish-local
feature.
- in sscheck
build.sbt
change the version to a value ending in "SNAPSHOT", e.g.0.2.1-SNAPSHOT
. Make modifications, and in sbt runreload
and thenpublish-local
, or+publish-local
for publishing for several versions of Scala. - in the dependent project
build.sbt
update the dependency to sscheck to the new version and in sbt runreload
,update
andeclipse
. As usual use-Xsource:2.10 -Ymacro-expand:none
See "to delete versions, packages or repos".
This pull request introduced support for several Scala versions at the same time. In order to deal with that:
- References
- Use
sbt +test
for testing for all versions. Also the first time you run it this will fail, have to runsbt clean
before. In general modify all Jenkins jobs to do a clean before, as that is a minimal isolation that we should be having anyway. - Use
++<scala version>
in sbt to set an Scala version, for example++2.10.6
. This is useful if I want to test for a particular scala version, or if I want to runeclipse
to generate a Eclipse project for a particular version. Remember I had to use single quotes for non interactively launching a complex sbt goal in Jenkins, likesbt 'test-only es.ucm.fdi.tfg.*'
- in particular use
sbt ++2.10.6 eclipse
to generate an Eclipse project for Scala 2.10.6
- in particular use