Skip to content

Commit

Permalink
back to old version deps logic with file
Browse files Browse the repository at this point in the history
  • Loading branch information
datYori committed Mar 19, 2024
1 parent 3545093 commit e4c748a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 357 deletions.
3 changes: 1 addition & 2 deletions snapi-frontend/project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import sbt._
import scala.xml.XML

object Dependencies {

Expand All @@ -9,7 +8,7 @@ object Dependencies {
val rawClientVersion = IO.read(new File("../client/version")).trim
val rawClient = "com.raw-labs" %% "raw-client" % rawClientVersion

val rawSnapiParserVersion = (XML.loadFile(new File("../snapi-parser/pom.xml")) \ "properties" \ "revision").text.trim
val rawSnapiParserVersion = IO.read(new File("../snapi-parser/version")).trim
val rawSnapiParser = "com.raw-labs" % "raw-snapi-parser" % rawSnapiParserVersion

val kiamaVersion = IO.read(new File("../deps/kiama/version")).trim
Expand Down
138 changes: 0 additions & 138 deletions snapi-parser/.scalafmt.conf

This file was deleted.

206 changes: 0 additions & 206 deletions snapi-parser/build.sbt

This file was deleted.

12 changes: 3 additions & 9 deletions snapi-parser/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ sdk use java 21-graalce

cd "$SCRIPT_HOME"

# when running on CI we don't care about this intermediate component versioning
if [ "$CI" == "true" ] && [ "$GITHUB_WORKFLOW" == "CI" ]; then
mvn clean install
# when running on publish workflow it is important to version it properly
# even if we don't publish it to maven central, it is a dependency for snapi-frontend and sql-client
else
VERSION=$(git describe --tags | sed 's/^v//;s/-\([0-9]*\)-g/+\1-/')
mvn clean install -Drevision=$VERSION
fi
VERSION=$(git describe --tags | sed 's/^v//;s/-\([0-9]*\)-g/+\1-/')
mvn clean install -Drevision=$VERSION
echo "${VERSION}" > version
3 changes: 1 addition & 2 deletions sql-client/project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import sbt._
import scala.xml.XML

object Dependencies {

val rawClientVersion = IO.read(new File("../client/version")).trim
val rawClient = "com.raw-labs" %% "raw-client" % rawClientVersion

val rawSnapiParserVersion = (XML.loadFile(new File("../snapi-parser/pom.xml")) \ "properties" \ "revision").text.trim
val rawSnapiParserVersion = IO.read(new File("../snapi-parser/version")).trim
val rawSnapiParser = "com.raw-labs" % "raw-snapi-parser" % rawSnapiParserVersion

val kiamaVersion = IO.read(new File("../deps/kiama/version")).trim
Expand Down

0 comments on commit e4c748a

Please sign in to comment.