Skip to content
Nepomuk Seiler edited this page Aug 7, 2016 · 14 revisions

This should provide some information on how to contribute, develop and do stuff around sbt-native-packager.

Testing

Most (all?) tests in sbt-native-packager use the scripted library. This will fork a new instance of sbt and load a project, running commands specified in the test file.

For most ubuntu systems, you can run a "as much as possible" run via:

$ sbt
>  scripted universal/* debian/* rpm/*

The "native" tests are split by operating system, and then descriptive-ish name for what the test does. Current categories of tests:

  • osx - Tests creating dmg files - scripted osx/*
  • windows - Requires WiX 3.6 installation, testing creating MSIs - scripted windows/
  • cygwin - Requires cygwin installed in the default location. Tests generated BASH files in cygwin (pathing fun)
  • debian - Requires dpkg, tests constructing debian files - scripted debian/*
  • rpm - Requires rpmbuild, tests constructing rpm files - scripted rpm/*
  • universal - Requires zip, tar and xz. Tests generating OS-generic files, although it will use some OS native commands as these generally cause less issues than Java counterparts - scripted universal/*

You can run a specific test via the command scripted <test-group>/<test-type>.

Documentation

The documentation can be found under src/sphinx.

Build the docs

First you have to install the sphinx and necessary dependencies

sudo apt-get install python-sphinx python-pip
pip install sphinx_rtd_theme

Now start up sbt with sbt and start the automatic compilation with

~sphinx:generateHtml

Open the index.html at target/sphinx/html.

Publish GitHub Page

sbt ghpagesPushSite

Releasing

How to release a version to Bintray and create a release tag.

Configuring your system

Open sbt

> bintrayWhoami
None
> bintrayChangeCredentials

Now you have configured bintray.

Release and Publish

sbt release

Create Release Notes

Use https://github.com/skywinder/github-changelog-generator

Old way

git clone [email protected]:muuki88/make-release-notes.git
cd make-release-notes
sbt 
> runMain BasicGithubReleeaseNotes -gh sbt/sbt-native-packager -p <previousTag> -n <releaseTag> -l /home/muki/Development/git/sbt-native-packager

Copy the output and go to sbt-native-packager/releases and click Draft a new release. Type-in the tag you created via the release call and add the output for the make-release-notes project.