summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-30 01:56:17 +0100
committerCarl Hetherington <cth@carlh.net>2022-12-30 01:57:37 +0100
commit32bc904578b7bc5957da453c777c1b091a6d7f34 (patch)
tree91b3f34f5ea38dbd6960cf461b7a71d62b121646
parentdd494941b8214c08d2d7f019a948c569583f3fa5 (diff)
Build .zst as well as .tar.bz2 for source targets (DoM #1705).
-rwxr-xr-xcdist10
1 files changed, 7 insertions, 3 deletions
diff --git a/cdist b/cdist
index da87f84..f36bdfd 100755
--- a/cdist
+++ b/cdist
@@ -891,7 +891,7 @@ class OSXUniversalTarget(OSXTarget):
self._copy_packages(tree, p, output_dir)
class SourceTarget(Target):
- """Build a source .tar.bz2"""
+ """Build a source .tar.bz2 and .zst"""
def __init__(self):
super(SourceTarget, self).__init__('source')
@@ -907,8 +907,12 @@ class SourceTarget(Target):
with TreeDirectory(tree):
name = read_wscript_variable(os.getcwd(), 'APPNAME')
command('./waf dist')
- p = os.path.abspath('%s-%s.tar.bz2' % (name, tree.version))
- copyfile(p, os.path.join(output_dir, os.path.basename(devel_to_git(tree.commit, p))))
+ bz2 = os.path.abspath('%s-%s.tar.bz2' % (name, tree.version))
+ copyfile(bz2, os.path.join(output_dir, os.path.basename(devel_to_git(tree.commit, bz2))))
+ command('tar xjf %s' % bz2)
+ command('tar --zstd -cf %s-%s.zst %s-%s' % (name, tree.version, name, tree.version))
+ zstd = os.path.abspath('%s-%s.zst' % (name, tree.version))
+ copyfile(zstd, os.path.join(output_dir, os.path.basename(devel_to_git(tree.commit, zstd))))
# @param s Target string:
# windows-{32,64}