Skip to content

Commit

Permalink
use consistent line endings on all platforms for bom files
Browse files Browse the repository at this point in the history
  • Loading branch information
lhns committed Jan 8, 2025
1 parent b1738cd commit fb28ec4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/com/github/sbt/sbom/BomTask.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ abstract class BomTask[T](protected val properties: BomTaskProperties) {
val params: BomExtractorParams = extractorParams(currentConfiguration)
val bom: Bom = new BomExtractor(params, report, log).bom
val bomText: String = bomFormat match {
case BomFormat.Json => BomGeneratorFactory.createJson(schemaVersion, bom).toJsonString
case BomFormat.Xml => BomGeneratorFactory.createXml(schemaVersion, bom).toXmlString
case BomFormat.Json => BomGeneratorFactory.createJson(schemaVersion, bom).toJsonString.replaceAll("\r?\n", "\n")
case BomFormat.Xml => BomGeneratorFactory.createXml(schemaVersion, bom).toXmlString.replaceAll("\r?\n", "\n")
}
logBomInfo(params, bom)
bomText
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/dependencies/compile/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ lazy val checkTask = Def.task {
s.log.info("Verifying bom content...")
makeBom.value
import scala.sys.process._
require(Seq("diff", "-w", "target/bom.xml", s"${thisProject.value.base}/etc/bom.xml").! == 0)
require(Seq("diff", "target/bom.xml", s"${thisProject.value.base}/etc/bom.xml").! == 0)
}
2 changes: 1 addition & 1 deletion src/sbt-test/dependencies/integrationTest/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ lazy val checkTask = Def.task {
val bomFile = (IntegrationTest / makeBom).value

import scala.sys.process._
require(Seq("diff", "-w", bomFile.getPath, s"${thisProject.value.base}/etc/bom.xml").! == 0)
require(Seq("diff", bomFile.getPath, s"${thisProject.value.base}/etc/bom.xml").! == 0)
s.log.info(s"${bomFile.getPath} content verified")
}
2 changes: 1 addition & 1 deletion src/sbt-test/dependencies/test/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ lazy val checkTask = Def.task {
val bomFile = (Test / makeBom).value

import scala.sys.process._
require(Seq("diff", "-w", bomFile.getPath, s"${thisProject.value.base}/etc/bom.xml").! == 0)
require(Seq("diff", bomFile.getPath, s"${thisProject.value.base}/etc/bom.xml").! == 0)
s.log.info(s"${bomFile.getPath} content verified")
}
2 changes: 1 addition & 1 deletion src/sbt-test/dependenciesJson/compile/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ lazy val checkTask = Def.task {
s.log.info("Verifying bom content...")
makeBom.value
import scala.sys.process._
require(Seq("diff", "-w", "target/bom.json", s"${thisProject.value.base}/etc/bom.json").! == 0)
require(Seq("diff", "target/bom.json", s"${thisProject.value.base}/etc/bom.json").! == 0)
}
2 changes: 1 addition & 1 deletion src/sbt-test/dependenciesJson/integrationTest/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ lazy val checkTask = Def.task {
val bomFile = (IntegrationTest / makeBom).value

import scala.sys.process._
require(Seq("diff", "-w", bomFile.getPath, s"${thisProject.value.base}/etc/bom.json").! == 0)
require(Seq("diff", bomFile.getPath, s"${thisProject.value.base}/etc/bom.json").! == 0)
s.log.info(s"${bomFile.getPath} content verified")
}
2 changes: 1 addition & 1 deletion src/sbt-test/dependenciesJson/test/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ lazy val checkTask = Def.task {
val bomFile = (Test / makeBom).value

import scala.sys.process._
require(Seq("diff", "-w", bomFile.getPath, s"${thisProject.value.base}/etc/bom.json").! == 0)
require(Seq("diff", bomFile.getPath, s"${thisProject.value.base}/etc/bom.json").! == 0)
s.log.info(s"${bomFile.getPath} content verified")
}

0 comments on commit fb28ec4

Please sign in to comment.