Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ spName := "databricks/spark-xml"

crossScalaVersions := Seq("2.11.12", "2.12.8")

// Necessary for JUnit tests to be found?
crossPaths := false
Copy link
Member Author

@HyukjinKwon HyukjinKwon Dec 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I at least see being ran fine in Travis CI ...

[info] Test com.databricks.spark.xml.JavaXmlSuite.testLoad started
[info] Test com.databricks.spark.xml.JavaXmlSuite.testSave started
[info] Test com.databricks.spark.xml.JavaXmlSuite.testXmlParser started

should not be a big deal .. I guess ..


scalacOptions := Seq("-unchecked", "-deprecation")

sparkVersion := sys.props.get("spark.testVersion").getOrElse("2.4.0")
Expand Down Expand Up @@ -61,6 +58,18 @@ pomExtra :=
</developer>
</developers>

publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

credentials += Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
sys.env.get("USERNAME").getOrElse(""),
sys.env.get("PASSWORD").getOrElse(""))

parallelExecution in Test := false

// Skip tests during assembly
Expand Down
34 changes: 34 additions & 0 deletions dev/make-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

# Release process:
#
# 1. Making a release requires PGP signing. Please make sure you generated a key.
# See https://www.scala-sbt.org/sbt-pgp/usage.html
#
# 2. Make sure your key is uploaded to one of keyservers. For instance, it is required to
# run 'sbt "pgp-cmd receive-key <key id> hkp://keyserver.ubuntu.com"'.
# See https://www.scala-sbt.org/sbt-pgp/usage.html
#
# 3. You should have an access to Databricks domain. This is typically
# requested by JIRA in Sonatype per individual.
# See https://issues.sonatype.org/browse/OSSRH-19509
#
# 4. Run this script, for instance, as below:
# 'USERNAME=username PASSWORD=password dev/make-release.sh'
# USERNAME and PASSWORD are the user name and password for Sonatype Nexsus Repository Manager.
#
# 5. After pushing the artifect to staging repogitory by running this script, you can manually
# release it in https://oss.sonatype.org.
# See also https://www.scala-sbt.org/1.x/docs/Using-Sonatype.html

if [[ -z "${USERNAME}" ]]; then
echo "'USERNAME' environment varible for 'Sonatype Nexus Repository Manager' is undefiend."
exit 1
fi

if [[ -z "${PASSWORD}" ]]; then
echo "'PASSWORD' environment varible for 'Sonatype Nexus Repository Manager' is undefiend."
exit 1
fi

sbt clean "+ publishSigned"