From 3c4f2c68412514120f9a970e262760bb4178d186 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Fri, 13 Nov 2020 22:19:21 +0100 Subject: [PATCH] Fix packaging tools Due to hardcoding files, the new ones were not packaged. --- build.sbt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index e7b0a853..32ed4d0b 100644 --- a/build.sbt +++ b/build.sbt @@ -672,14 +672,20 @@ def packageTools(logger: Logger, dir: File, version: String): Seq[File] = { webext ) + val excludes = Seq(wx, target) + + val files = + (dir ** "*") + .filter(f => !excludes.exists(p => f.absolutePath.startsWith(p.absolutePath))) + .pair(sbt.io.Path.relativeTo(dir)) + .map({case (f, name) => (f, s"docspell-tools-${version}/$name") }) + IO.zip( Seq( webext -> s"docspell-tools-${version}/firefox/docspell-extension.xpi", wx / "native/app_manifest.json" -> s"docspell-tools-${version}/firefox/native/app_manifest.json", - wx / "native/native.py" -> s"docspell-tools-${version}/firefox/native/native.py", - dir / "ds.sh" -> s"docspell-tools-${version}/ds.sh", - dir / "consumedir.sh" -> s"docspell-tools-${version}/consumedir.sh" - ), + wx / "native/native.py" -> s"docspell-tools-${version}/firefox/native/native.py" + ) ++ files, archive )