diff --git a/.gitignore b/.gitignore index b382897..c7b0195 100644 --- a/.gitignore +++ b/.gitignore @@ -87,6 +87,7 @@ project/boot/ # sbt specific .lib/ +.bsp/ dist/* project/plugins/project/ @@ -106,4 +107,4 @@ gradle-app.setting .gradletasknamecache # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 -# gradle/wrapper/gradle-wrapper.properties \ No newline at end of file +# gradle/wrapper/gradle-wrapper.properties diff --git a/README.md b/README.md index 36f403e..683b6c4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,21 @@ -#Update-changes +# Update-changes -##TODO -Document it \ No newline at end of file +## TODO + +Document it + +## Installing + +``` +resolvers += "Agilogy GitLab" at "https://gitlab.com/api/v4/groups/583742/-/packages/maven" + +libraryDependencies += "com.agilogy" %% "update-changes" % "1.2" +``` + +## Publishing + +To publish this package to Agilogy's Package Registry, set the `GITLAB_DEPLOY_TOKEN` environment variable and then run the following command in sbt: + +``` +sbt:update-changes> +publish +``` diff --git a/build.sbt b/build.sbt index 9569fdb..e30ffdb 100644 --- a/build.sbt +++ b/build.sbt @@ -1,22 +1,38 @@ +import com.gilcloud.sbt.gitlab.{GitlabCredentials,GitlabPlugin} + organization := "com.agilogy" name := "update-changes" -scalaVersion := "2.11.8" - -crossScalaVersions := Seq("2.10.6","2.11.8") +scalaVersion := "2.11.12" -bintrayRepository := "scala" - -bintrayOrganization := Some("agilogy") +crossScalaVersions := Seq("2.10.6", "2.11.12") licenses += ("GPL-2.0", url("https://www.gnu.org/licenses/old-licenses/gpl-2.0.html")) licenses += ("MPL-2.0", url("https://www.mozilla.org/en-US/MPL/2.0/")) libraryDependencies ++= Seq( - "com.typesafe.play" %% "play-json" % "2.4.6" + "com.typesafe.play" %% "play-json" % "2.4.11" ) +// --> gitlab + +GitlabPlugin.autoImport.gitlabGroupId := None +GitlabPlugin.autoImport.gitlabProjectId := Some(26236490) +GitlabPlugin.autoImport.gitlabDomain := "gitlab.com" + +GitlabPlugin.autoImport.gitlabCredentials := { + val token = sys.env.get("GITLAB_DEPLOY_TOKEN") match { + case Some(token) => token + case None => + sLog.value.warn(s"Environment variable GITLAB_DEPLOY_TOKEN is undefined, 'publish' will fail.") + "" + } + Some(GitlabCredentials("Deploy-Token", token)) +} + +// <-- gitlab + enablePlugins(GitVersioning) -git.useGitDescribe := true \ No newline at end of file +git.useGitDescribe := true diff --git a/project/build.properties b/project/build.properties index 19623ba..ddffd37 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 0.13.8 +sbt.version = 1.4.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index 82e2151..0119824 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ logLevel := Level.Warn -addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0") +addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5") \ No newline at end of file +addSbtPlugin("com.gilcloud" % "sbt-gitlab" % "0.0.6")