[PATCH] D118481: Add cmake to source release tarballs

Konrad Wilhelm Kleine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 11 02:54:51 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG32a0482a65b8: Add cmake to source release tarballs (authored by kwk).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118481/new/

https://reviews.llvm.org/D118481

Files:
  llvm/utils/release/export.sh


Index: llvm/utils/release/export.sh
===================================================================
--- llvm/utils/release/export.sh
+++ llvm/utils/release/export.sh
@@ -131,7 +131,14 @@
     for proj in $projects; do
         echo "Creating tarball for $proj ..."
         pushd $llvm_src_dir/$proj
-        git archive --prefix=$proj-$release$rc.src/ $tree_id . | xz >$target_dir/$(template_file $proj)
+        target_archive_file=$target_dir/$(template_file $proj)
+        trap "rm -fv $target_archive_file.tmp" EXIT
+        git archive --prefix=$proj-$release$rc.src/ -o $target_archive_file.tmp $tree_id .
+        # Get relative path to top-level cmake directory to be packaged
+        # alongside the project. Append that path to the tarball.
+        cmake_rel_path=$(realpath --relative-to=. $llvm_src_dir/cmake)
+        tar --append -f $target_archive_file.tmp $cmake_rel_path
+        cat $target_archive_file.tmp | xz > $target_archive_file
         popd
     done
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118481.407820.patch
Type: text/x-patch
Size: 989 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220211/cf6099f4/attachment.bin>


More information about the llvm-commits mailing list