diff --git a/.travis.yml b/.travis.yml index bf214d7..be36a8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,17 +8,30 @@ env: - TRAVIS_SBT_VERSION="1.2.8" - secure: SVb4Odan6bePQ6v8BhAWYkW2JhHYiS4UojkmEZacEsobjgNAkI4qSGYjC8pcIvBUKnFPafHRG/ggtrZ8ml1beX9bXQxJsmGOutJEMuQyInPUDXdvUHABNBd/8NL8tJhZS6Ijnzbar6i78vizZNW88V9HpWwk2HZQyHw9q5mp1R0nHOG9L1474I62hnc/rclAPecWgUbiTft2mPXRohmb8aFhqAceYao+1g1LY4AuXyPiM3s4sU1YzdL/DJLWVbt8WUAmPUfiAKpGSQY98bBBxCfJrNDezIhENcY/MTo5+cGEcVtfJKu9psL5fShOPUChnnonHSb34/XWyocgN8ZrCQTfhqI1lIzB8HOc3nRiKwPfUcZ2MQ5P4fJi62rzfhEz8/r3HlvhKM+m1++wc7ocsb7+ku59xn93DWYkXKVkD2r3DnzaANd2FMFplopFSEgBJVGTKOXQSSVriMKeTpg2q13PvDhhUTIgOus4MX+n/q4XiAFLygCceRXq1mXFKi0sjWLrJkBldkg8VA1dL31RdK5ZN5K+56gSYPVhvOVeKx2URkbNDV3Y0z8rM33852VI7pdkRuGAZZFfKwVGOFlc5HcbLRln0e2oql1KtOWjyfFicT9pjHfeg2dfIrKBKMrJGavaLdh8kuX/0kKp37SdP+mJtVqJTwwoCXJol6tcl/s= - secure: IblLuw3rbTHi3Bozgz2h5IUaL9VfdLAdep4u95V4A/GGxR/nfXkfOuxT10c1+OrYc2+KxKDGChhlTvMd6HsHi5LUmPgfgB4MQMXs4OTsBDX3mMD4uSWbzBFyq/Z0YdbJxfQisJkseWDl7HWGuiAJyiRUdLkyEj3L9mtIqqHzsfN47V1mgAriilo+bDeLLmRrrCL9M+Y1B3fJnmcL2ptLwssZi2fcUoplmS7EjYcf0c0hYeGd3TcI6Qw31nQxRilH49Tlxp9RSWiV1IEQMBV3a7y14ttGZJ7erVXH5Px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 - nvm use 6 - node --version +- if [ $TRAVIS_PULL_REQUEST = 'false' ]; then + openssl aes-256-cbc -K $encrypted_76f871b6a7fb_key -iv $encrypted_76f871b6a7fb_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' ] && [[ "$( [tests](joda-time/js/src/test/scala/org/joda/time/DateTimeSpec.scala) +- [LocalDate](joda-time/js/src/main/scala/org/joda/time/LocalDate.scala) => [tests](joda-time/js/src/test/scala/org/joda/time/LocalDateSpec.scala) +- [LocalTime](joda-time/js/src/main/scala/org/joda/time/LocalTime.scala) => [tests](joda-time/js/src/test/scala/org/joda/time/LocalTimeSpec.scala) -are defined as wrappers around the corresponding ISO time formatted string -and do not contain any logic. - -Once you receive from an API on JS side an object that uses them -you can use `toString` method to get an ISO time formatted string -and pass it to your favorite JS time library to parse it. +Once you receive from an API on `JS` side an object that uses them +you can use `toString` method to get an `ISO time formatted string` +and pass it to your favorite `JS time library` to parse it. For example, you could use standard [JS Date](https://www.w3schools.com/jS/js_date_methods.asp) class to parse it: @@ -83,4 +82,4 @@ sbt test ## Documentation -You can find documentation [here](https://scommons.org/scommons-api) +You can find more documentation [here](https://scommons.org/scommons-api) diff --git a/pgp.sbt b/pgp.sbt new file mode 100644 index 0000000..b25983a --- /dev/null +++ b/pgp.sbt @@ -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) diff --git a/project/plugins.sbt b/project/plugins.sbt index 79a506e..d488fdf 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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()) diff --git a/project/src/main/scala/definitions/ApiModule.scala b/project/src/main/scala/definitions/ApiModule.scala index b721872..7570e6d 100644 --- a/project/src/main/scala/definitions/ApiModule.scala +++ b/project/src/main/scala/definitions/ApiModule.scala @@ -3,6 +3,7 @@ package definitions import sbt.Keys._ import sbt._ import scommons.sbtplugin.project.CommonModule +import xerial.sbt.Sonatype.autoImport._ trait ApiModule extends CommonModule { @@ -22,6 +23,7 @@ object ApiModule { // // publish/release related settings: // + sonatypeProfileName := "org.scommons", publishMavenStyle := true, publishArtifact in Test := false, publishTo := { diff --git a/travis/secrets.tar.enc b/travis/secrets.tar.enc new file mode 100644 index 0000000..2022d12 Binary files /dev/null and b/travis/secrets.tar.enc differ diff --git a/version.sbt b/version.sbt index 57b0bcb..e29d6d7 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "0.1.0-SNAPSHOT" +version in ThisBuild := sys.env.getOrElse("version", default = "1.0.0-SNAPSHOT").stripPrefix("v")