Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 03 11:22
    raboof commented #198
  • Jan 03 11:06
    mkurz commented #198
  • Jan 03 10:53
    raboof commented #198
  • Jan 03 10:12
    mkurz commented #198
  • Jan 03 09:52
    mkurz opened #198
  • Oct 28 2021 13:44
    lightbend-cla-validator commented #197
  • Oct 28 2021 13:44
    liorregev opened #197
  • Oct 28 2021 13:39
    liorregev opened #196
  • Oct 07 2021 08:52
    raboof opened #195
  • Oct 07 2021 08:32

    raboof on v1.0.2

    (compare)

  • Oct 07 2021 08:27
    raboof commented #168
  • Oct 07 2021 08:25

    raboof on master

    Fix invalid .git capture Fixes… Merge pull request #194 from ra… (compare)

  • Oct 07 2021 08:25
    raboof closed #194
  • Oct 07 2021 08:25
    raboof closed #193
  • Oct 06 2021 07:15
    alejandrohdezma commented #193
  • Oct 06 2021 07:15
    alejandrohdezma commented #194
  • Oct 05 2021 13:33
    raboof unassigned #193
  • Oct 05 2021 13:33
    raboof commented #193
  • Oct 05 2021 13:32
    raboof opened #194
  • Oct 05 2021 12:32
    raboof assigned #193
Luciano
@lJoublanc
Ah just restarted SBT and it worked. Weird.
Ivano Pagano
@ivanopagano
about my previous question on running git commands I solved using Command.process("git ...", state) from a wrapping Command.command("myCmd") {...} definition, so I call sbt myCmd which in turn executes git from the sbt shell
bhaaratcrckt
@bhaaratcrckt_twitter
I've enabled this plugin. I can now run git status from inside the shell when in sbt. However, I am confused as to how to use the versioning feature of this plugin. in my build.sbt i have a hardcoded value version := "1.1.5". I don't want this hardcoded value but rather want it generated from this plugin. Is this possible to do ?
Ivano Pagano
@ivanopagano
@bhaaratcrckt_twitter simply remove the version key definition from your build
it will be computed for you
you can check it in the sbt calling show version
Jakub Kozłowski
@kubukoz
is there a quick way to get just the latest tag in sbt-git?
without any hashes, etc - just the latest existing tag
Ivano Pagano
@ivanopagano
there's a bunchful of useful vals in the exported object, let me check it for ya: https://github.com/sbt/sbt-git/blob/master/src/main/scala/com/typesafe/sbt/SbtGit.scala#L14
you'll find a gitCurrentTags which gives you a Seq of tags
in your sbt file you simply ask for git.gitCurrentTags as a SettingKey
@kubukoz :point_up:
keep in mind that any change to the git repo might need an sbt reload to update those values...
Jakub Kozłowski
@kubukoz
nope, gitCurrentTags gives me an empty seq
basically the situation is like this:
  • I tagged a commit on master
  • I committed a few times to master after that
  • I'm trying to get the latest tag on master
current tags, the way I see it, gives me an empty list because the current commit isn't part of any tag
Ivano Pagano
@ivanopagano
you could use git describe within a custom sbt task that would have to invoke the corresponding sbt command, provided by the plugin... I did go that path for some things and it's not too pretty, but it should be feasible... the complicated piece with sbt is that you want to call a command (that needs a build state) from a task, which has none. There's a Task already to get the state, but I couldn't yet figure out how to read sbt's logged output for the describe command as something that the task can return as a value...
BaghdadKh
@BaghdadKh
Hi , How do I fork an existing repo from my sbt ?
Naseem Mahasneh
@naseem91
Hi all ! Anyone know how to commit and push to git from sbt ?
Brian McKenna
@puffnfresh
our builds are failing at work because 0.8.5 for SBT 0.13
can not be found, did it get unpublished from Bintray?
0.8.5 seems to be missing, it did exist as of 4 days ago :/
Beck Gaël
@beckgael
Hello,
I would like to know how to deal with cross api/language version using sbt.
For example i would like to be able to build one jar with scala-2.11/spark-2.3.3 and another with scala-2.12-spark-2.4.4 in a multi sub project environment.
Thank you
Beck Gaël
@beckgael
Any clues since :) ? Or maybe i expressed not enough clearly :(
Brian P. Holt
@bpholt
@beckgael something like this might work:
libraryDependencies ++= {
  CrossVersion.partialVersion(scalaVersion.value) match {
    case Some((2, 12)) => Seq("organization" %% "artifact" % "version")
    case Some((2, 11)) => Seq("organization" %% "artifact" % "version")
    case _ => Nil
  }
}
but this question might get more traction in the sbt/sbt room; this room is more meant for questions about the sbt-git plugin
Beck Gaël
@beckgael
Thank you @bpholt, my bad for expose my issue not one the more appropriate place, i should be more carreful next time...
Pritam Kadam
@kpritam
I am using ghpages plugin which internally uses sbt-git
We have configured github actions workflow to publish docs to ghpages on remote repo
how do you pass github token to sbt-git? does sbt-git reads token from some file or env variable?
Beck Gaël
@beckgael
This message was deleted
Justin Reeves
@justinallenreeves
Am I using the plugin wrong?
Added it, started sbt succesully, git add ., git commit -m “added sb-git”, git push worked successfully
but then I want to git commit —amend after making some more changes and it hung, I wonder if it’s because it wants to open my $EDITOR and doesn’t know how
Justin Reeves
@justinallenreeves
Also anyone know how to get the GitBranchPrompt plugin to work with PlayScala?
Jason Yeo
@jsyeo:matrix.org
[m]
is this project still being maintained?
it looks abandoned. the last release was in 2018 :(
Zachary LeFevre
@zachlefevre

I need to access the git SHA from within my code. Ideally I'd be able to access the current sha from the buildInfo object generated by the sbt-buildinfo plugin.

I'm having a hard time.
I have .enablePlugins(sbtbuildinfo.BuildInfoPlugin, GitVersioning) on a common project, and addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") in my plugins.sbt file.

How do I now access git properties (specifically the git head sha) ?

Zachary LeFevre
@zachlefevre
I've found a solution.
In my build I do:
import com.typesafe.sbt.SbtGit.GitKeys.gitHeadCommit
...
    buildInfoKeys := Seq[BuildInfoKey] (name, version, scalaVersion, sbtVersion, "gitsha" -> {gitHeadCommit.value}),
raboof
@raboof:matrix.org
[m]
Jason Yeo: not very actively, as you noticed, but I just did a release a few weeks ago
1 reply
ramakrishna-hande
@ramakrishna-hande

I have a SBT project running on scala 2.11.12 and SBT 1.2.1 . I recently upgraded the SBT version to 1.3.1. Suddenly I started getting OOM error.

My SBT OPTS with SBT 1.2.1 are like this.

-J-Xms512M
-J-Xmx4G
-J-Xss2M
-J-XX:MaxMetaspaceSize=1024M
-Dhttp.nonProxyHosts=localhost

Now when I change the XX:MaxMetaspaceSize to 3072M, I suddenly see OOM vanishing.

Is it a reasonable workaround to use more Metaspace just for a newer SBT version ?