File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -e
3+ set -o pipefail
24
35artifacts=$*
46injection_string=" Provides-Dist: appmap"
57if [ -n " $artifacts " ] && [ -n " $DISTRIBUTION_NAME " ] && [ " $DISTRIBUTION_NAME " != " appmap" ]; then
68 echo " Altered distribution name detected, injecting '$injection_string ' into artifacts: $artifacts "
79 for artifact in $artifacts ; do
810 TMP=$( mktemp -d)
9- ARTIFACT_PATH=" $artifact "
11+ ARTIFACT_PATH=" $( realpath ${ artifact} ) "
1012 if [[ $artifact == * .whl ]]; then
1113 unzip -q " $ARTIFACT_PATH " -d " $TMP "
1214 DISTINFO=$( find " $TMP " -type d -name " *.dist-info" )
1315 echo " $injection_string " >> " $DISTINFO /METADATA"
1416 (cd " $TMP " && zip -qr " $ARTIFACT_PATH " .)
1517 else
1618 tar -xzf " $ARTIFACT_PATH " -C " $TMP "
17- PKGDIR=$( find " $TMP " -maxdepth 1 -type d -name " *" )
18- echo " Provides-Dist: appmap " >> " $PKGDIR /PKG-INFO"
19+ PKGDIR=$( find " $TMP " -maxdepth 1 -type d -name " *.egg-info " -o -name " * " -type d | grep -v " ^\.$ " )
20+ echo " $injection_string " >> " $PKGDIR /PKG-INFO"
1921 (cd " $TMP " && tar -czf " $ARTIFACT_PATH " .)
2022 fi
2123 echo " ($injection_string ): patched $ARTIFACT_PATH "
You can’t perform that action at this time.
0 commit comments