Skip to content

Commit c3d2b6f

Browse files
thijskhtvdijen
andauthored
fix: tarball extracted in current directory (#1752)
* fix: tarball extracted in current directory * Cleanup composer-file --------- Co-authored-by: Tim van Dijen <tvdijen@gmail.com>
1 parent 5102e38 commit c3d2b6f

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

bin/build-release.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ COMPOSER="/tmp/composer.phar"
2424
cd /tmp
2525

2626
if [ -a "$TARGET" ]; then
27-
echo "$0: Destination already exists: $TARGET" >&2
27+
echo "$0: Destination already exists: /tmp/$TARGET" >&2
2828
exit 1
2929
fi
3030

@@ -43,6 +43,10 @@ php "$COMPOSER" config version "v$VERSION"
4343
# Install dependencies (without vcs history or dev tools)
4444
php "$COMPOSER" install --no-dev --prefer-dist -o
4545

46-
php "$COMPOSER" archive -f tar.gz --dir /tmp --file "$TARGET"
46+
cd ..
47+
for f in `grep export-ignore "$TARGET/.gitattributes"|cut -d ' ' -f 1`; do
48+
rm -r "$TARGET/$f"
49+
done
50+
tar --owner 0 --group 0 -cvzf "/tmp/$TARGET.tar.gz" "$TARGET"
4751
rm "$COMPOSER"
4852
echo `sha256sum /tmp/$TARGET.tar.gz`

composer.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,5 @@
109109
"simplesamlphp/composer-module-installer": true,
110110
"muglug/package-versions-56": true
111111
}
112-
},
113-
"archive": {
114-
"exclude": [
115-
".editorconfig",
116-
".gitattributes",
117-
".gitignore",
118-
".markdownlintignore",
119-
".markdownlintrc",
120-
".php_cs.dist",
121-
"bin/build-release.sh",
122-
"cert/.gitkeep",
123-
"codecov.yml",
124-
"node_modules",
125-
"phpcs.xml",
126-
"phpunit.xml",
127-
"phpunit-interoperability.xml",
128-
"psalm.xml",
129-
"public/assets/.gitkeep",
130-
"tests"
131-
]
132112
}
133113
}

0 commit comments

Comments
 (0)