aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz.driver.sbt/Service.scala
Commit message (Collapse)AuthorAgeFilesLines
* Rename plugins to include a -Plugin suffixJakob Odersky2018-08-021-85/+0
|
* Set max ram usage to higher defaultv2.0.0-RC4Jakob Odersky2018-08-011-1/+10
|
* Use default versioning (git and env) only in library projectsJakob Odersky2018-08-011-0/+1
|
* Import root certificates to the correct keystoreJakob Odersky2018-08-011-2/+3
|
* Upgrade version of openjdk used in container imagesJakob Odersky2018-08-011-1/+1
|
* Set undefined custom commandsJakob Odersky2018-08-011-0/+1
|
* Include git commit hash in docker image tags (#5)Jakob Odersky2018-07-231-10/+8
| | | | | | * Include git commit hash in docker image tags * Add timestamp and make git commit optional
* Refactor settings to use autoplugins (#4)Jakob Odersky2018-06-291-0/+75
**Overview and motivation** This consolidates settings that were previously implemented as functions and/or implicit conversions into a suite of sbt autoplugins. The rationale is that this is well-defined pattern by sbt and allows easy build introspection with standard sbt functionality (for example, `sbt plugins` will list all active plugins in a build). Furthermore, it makes it very easy to disable certain features when required, such as removing linting during development. **Migration from current version** All features from the previous version should still be provided by the changes proposed here. The migration path is quite straight-forward: - Replace `project.driverService(name)` with `project.enablePlugins(Service)` (same goes for libraries) and make sure the project's name corresponds to the service's name - Linting, which was previously enabled by adding `lintingSettings` and `formatSettings` to a project, is automatically enabled. It may be removed by disabling the plugin: `project.dsiablePlugin(Linting)` All tasks and settings provided by sbt-settings should remain the same. **Additional features** An additional feature is that versioning is now handled the same way between libraries and services; that is, the version is derived from the latest git tag. Since services may be deployed from the same tag mutliple times, it is required that versions can be explicitly set to include additional information, such as a build number from a CI system. This was previously done interactively, using sbt's `set` command: ``` export TAG="$(sbt -no-colors version | tail -1 | awk '{ print $2 }').$TRAVIS_BUILD_NUMBER" sbt "set version := \"$TAG\"" docker:publishLocal ``` While this approach works, it has the downsides of requiring mutliple sbt invocations. The changes proposed in this PR will read the version from a VERSION environment variable first, defaulting to git if unavailable. Therefore, the additional sbt invocation can be removed with a CI script similar to the following: ``` export VERSION="$(git describe).$TRAVIS_BUILD_NUMBER"" sbt docker:publishLocal // use version in other steps ``` Using an autoplugin-based approach may also make it easier to cross-compile projects to ScalaJS and Native in the future, as support for them is built into sbt-crossproject.