Skip to content

Commit

Permalink
Reinstate and deprecate older methods to preserve binary backward com…
Browse files Browse the repository at this point in the history
…patibility with 1.0.4

The methods in question are the methods used to create various kinds of archives (e.g. zip or tar)
from com.typesafe.sbt.packager.universal.Archives
  • Loading branch information
fsat committed Sep 10, 2015
1 parent a16c9ec commit dcf7f95
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/main/scala/com/typesafe/sbt/packager/universal/Archives.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ import sbt._
/** Helper methods to package up files into compressed archives. */
object Archives {

/**
* Makes a zip file in the given target directory using the given name.
* @param target folder to build package in
* @param name of output (without extension)
* @param mappings included in the output
* @param top level directory
* @return zip file
*/
@deprecated(
"Use [[com.typesafe.sbt.packager.universal.Archives.makeZip(File, String, Seq[(File, String)], Option[String], Seq[String]): File]]",
since = "1.0.5"
)
def makeZip(target: File, name: String, mappings: Seq[(File, String)], top: Option[String]): File =
makeZip(target, name, mappings, top, options = Seq.empty[String])

/**
* Makes a zip file in the given target directory using the given name.
*
Expand All @@ -29,6 +44,22 @@ object Archives {
zip
}

/**
* Makes a zip file in the given target directory using the given name.
*
* @param target folder to build package in
* @param name of output (without extension)
* @param mappings included in the output
* @param top level directory
* @return zip file
*/
@deprecated(
"Use [[com.typesafe.sbt.packager.universal.Archives.makeNativeZip(File, String, Seq[(File, String)], Option[String], Seq[String]): File]]",
since = "1.0.5"
)
def makeNativeZip(target: File, name: String, mappings: Seq[(File, String)], top: Option[String]): File =
makeNativeZip(target, name, mappings, top, options = Seq.empty[String])

/**
* Makes a zip file in the given target directory using the given name.
*
Expand All @@ -51,6 +82,24 @@ object Archives {
zip
}

/**
* Makes a dmg file in the given target directory using the given name.
*
* Note: Only works on OSX
*
* @param target folder to build package in
* @param name of output (without extension)
* @param mappings included in the output
* @param top level directory : NOT USED
* @return dmg file
*/
@deprecated(
"Use [[com.typesafe.sbt.packager.universal.Archives.makeDmg(target: File, name: String, mappings: Seq[(File, String)], top: Option[String], options: Seq[String]): File]]",
since = "1.0.5"
)
def makeDmg(target: File, name: String, mappings: Seq[(File, String)], top: Option[String]): File =
makeDmg(target, name, mappings, top, options = Seq.empty[String])

/**
* Makes a dmg file in the given target directory using the given name.
*
Expand Down

0 comments on commit dcf7f95

Please sign in to comment.