Skip to content

Commit

Permalink
Added publish/release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-podzigun committed Apr 16, 2019
1 parent 4e70015 commit f711923
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 19 deletions.
17 changes: 15 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,30 @@ env:
- TRAVIS_SBT_VERSION="1.2.8"
- secure: mNYTA9y/VA5dhG4Ukg24uRfYEC/s5kMEJKaVg9YdikA9Kad8GlxUVuCmg49BJjGen446NqM9DgrF9/+UTyUkywyC5vqCA+ILI9J3POvkiOhy5A99Ymip5VrYdJEBqTr3SszxkFtZ0nSR8xxN6ypiQ/DDCUMHyYweeX4ZruTcOZKMnTXD9fw/q4WHxL/leO5mSbEVYDh5nhMOxg9etmtezTfW6VRUfe1D7t7odIkIViDuhzIxqHx1J1CqWTC52x6DzbOiEeBrl1ZLl3r+weQA8HtxjTtqC+HutsrsRGwS/0ew+A9jOuOcHSoNIiC1JbSEvTFkvin1jwNqDjj8WPu2vZvGVSukvFQtaH2I5SEBPKBnteoV/4TSGvU6aZ4WdaJIULg3gXeoOSLxzC5WEyqYMBiWWtH3VkAQy6+CknD+TfKuBU0u2EsXxY0ni1mTZPWldoErzPQlDMs4cIfRZ5iaSwoXvC7tLVCGHJfaOKhKwslcspaufUWZcOvgrrNjlnjqghrqQa8GDnLCXcJwal6EMH0RJqgWymZ0JdZUB61pQ9ZD2AylpCdQSUqUDq1gFQyGpN+QIWTNYgteO6zKrZMeKknDh7uCEcovFI9ZmZYoF0NtA2lPGgBg3Zeb41+MUKwVSzQG3QocVzLcHSA66ZV/F4MMzrmZ05jIp7yHxCztmzg=
- secure: ArRCYDfNlBMAQJpRBtFedg6Bw43nvxfkh7Eec0oFUdxrO9z1zf9ezpNeyx67lnJ29E8i9eEWtaT+XE1W8KpewQJHogxq84A1PoVI84VMtzf5NAwjZBN+TV3mPbmme8rADmFAFWBD7zF5eSpNtQkDK2BUjC4u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pcb+UWYUbTW4ylHScOQPkdo4riMa+3qlBcO5g07u7EXSu0GHO6y/ci4scLNFkwdCoVjcf42oeFZOlrKJ4VV4VVBBA4uQ7mflRlSX0l3PlUg4A+dY5J6CiMjE5z2z4=
before_install:
- nvm install 6
- nvm use 6
- node --version
- if [ $TRAVIS_PULL_REQUEST = 'false' ]; then
openssl aes-256-cbc -K $encrypted_298c6ae3b350_key -iv $encrypted_298c6ae3b350_iv -in travis/secrets.tar.enc -out travis/secrets.tar -d;
tar xv -C travis -f travis/secrets.tar;
fi
script:
- sbt clean coverage test coverageReport &&
sbt coverageAggregate
after_success:
- sbt coveralls
- if [ $TRAVIS_BRANCH = 'master' ] && [[ "$(<version.sbt)" =~ (.*SNAPSHOT.*) ]]; then
sbt clean publish;
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" -o "$TRAVIS_BRANCH" == "$TRAVIS_TAG" ]; then
if [ -z "$TRAVIS_TAG" ]; then
echo "Publish a snapshot";
sbt clean publish;
else
echo "Publish a release version=$TRAVIS_TAG";
version=$TRAVIS_TAG sbt clean publishSigned sonatypeRelease;
fi
else
echo "This is not a master branch commit. Skipping the publish/release step";
fi
cache:
directories:
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

[![Build Status](https://travis-ci.org/scommons/scommons-client.svg?branch=master)](https://travis-ci.org/scommons/scommons-client)
[![Coverage Status](https://coveralls.io/repos/github/scommons/scommons-client/badge.svg?branch=master)](https://coveralls.io/github/scommons/scommons-client?branch=master)
[![scala-index](https://index.scala-lang.org/scommons/scommons-client/scommons-client-ui/latest.svg)](https://index.scala-lang.org/scommons/scommons-client/scommons-client-ui)
[![Scala.js](https://www.scala-js.org/assets/badges/scalajs-0.6.17.svg)](https://www.scala-js.org)

## Scala Commons
Scala and Scala.js common utilities and components.
## Scala Commons Client
Common Scala.js, React.js web-client utilities and components.


### Showcase/Demo UI
Expand All @@ -15,25 +16,24 @@ To see the showcase/demo UI with all the components live use the following link:

### How to add it to your project

Current version is under active development, but you already can try it:
```scala
val scommonsApiVer = "0.1.0-SNAPSHOT"
val scommonsServiceVer = "0.1.0-SNAPSHOT"
val scommonsReactVer = "0.1.0-SNAPSHOT"
val scommonsClientVer = "0.1.0-SNAPSHOT"
val scommonsApiVer = "1.0.0-SNAPSHOT"
val scommonsReactVer = "1.0.0-SNAPSHOT"
val scommonsClientVer = "1.0.0-SNAPSHOT"
val scommonsServiceVer = "1.0.0-SNAPSHOT"

libraryDependencies ++= Seq(
// shared
"org.scommons.api" %%% "scommons-api-core" % scommonsApiVer,
"org.scommons.api" %%% "scommons-api-joda-time" % scommonsApiVer,

// server/jvm only
"org.scommons.api" %% "scommons-api-play-ws" % scommonsApiVer,
"org.scommons.service" %% "scommons-service-play" % scommonsServiceVer,

// client/js only
"org.scommons.client" %%% "scommons-client-ui" % scommonsClientVer,
"org.scommons.react" %%% "scommons-react-test-dom" % scommonsReactVer % "test"
"org.scommons.react" %%% "scommons-react-test-dom" % scommonsReactVer % "test",

// server/jvm only
"org.scommons.service" %% "scommons-service-play" % scommonsServiceVer,
"org.scommons.api" %% "scommons-api-play-ws" % scommonsApiVer % "test"
)
```

Expand All @@ -57,4 +57,4 @@ Please, see the README.md in [showcase](https://github.com/scommons/scommons-cli

## Documentation

You can find documentation [here](https://scommons.org/scommons-client)
You can find more documentation [here](https://scommons.org/scommons-client)
7 changes: 7 additions & 0 deletions pgp.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

//see: https://www.scala-sbt.org/sbt-pgp/usage.html

useGpg := false
pgpPublicRing := file("./travis/pubring.gpg")
pgpSecretRing := file("./travis/secring.gpg")
pgpPassphrase := sys.env.get("PGP_PASS").map(_.toArray)
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositor
//use patched versions by now, to make scoverage work with scalajs-bundler
addSbtPlugin(("org.scommons.patched" % "sbt-scalajs-bundler" % "0.14.0-SNAPSHOT").force())

addSbtPlugin(("org.scommons.sbt" % "sbt-scommons-plugin" % "0.1.0-SNAPSHOT").changing())
addSbtPlugin(("org.scommons.sbt" % "sbt-scommons-plugin" % "1.0.0-SNAPSHOT").changing())
4 changes: 2 additions & 2 deletions project/src/main/scala/common/Libs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import scommons.sbtplugin.project.CommonLibs

object Libs extends CommonLibs {

val scommonsReactVersion = "0.1.0-SNAPSHOT"
private val scommonsApiVersion = "0.1.0-SNAPSHOT"
val scommonsReactVersion = "0.1.0"
private val scommonsApiVersion = "0.1.0"
private val sjsReactJsVer = "0.14.0"

lazy val scommonsReactCore = Def.setting("org.scommons.react" %%% "scommons-react-core" % scommonsReactVersion)
Expand Down
2 changes: 2 additions & 0 deletions project/src/main/scala/definitions/ClientModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package definitions
import sbt.Keys._
import sbt._
import scommons.sbtplugin.project.CommonModule
import xerial.sbt.Sonatype.autoImport._

trait ClientModule extends CommonModule {

Expand All @@ -22,6 +23,7 @@ object ClientModule {
//
// publish/release related settings:
//
sonatypeProfileName := "org.scommons",
publishMavenStyle := true,
publishArtifact in Test := false,
publishTo := {
Expand Down
Binary file added travis/secrets.tar.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.1.0-SNAPSHOT"
version in ThisBuild := sys.env.getOrElse("version", default = "1.0.0-SNAPSHOT").stripPrefix("v")

0 comments on commit f711923

Please sign in to comment.