summaryrefslogtreecommitdiffstats
path: root/makesrc.sh
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-01-25 11:02:30 +0100
committerRemi Collet <remi@php.net>2022-01-25 11:02:30 +0100
commit8832a066e80b1d4bcc29b8416eb8e8ea62353fea (patch)
tree7dbd0a193e3a1e77fdcf91abb9b2a9d82fbc2285 /makesrc.sh
parent7bea14415f5dce48e237625e191386403a888298 (diff)
use system libraries on Fedora, bundled libraries on EL
Diffstat (limited to 'makesrc.sh')
-rwxr-xr-xmakesrc.sh34
1 files changed, 21 insertions, 13 deletions
diff --git a/makesrc.sh b/makesrc.sh
index 9615a91..1d89e2e 100755
--- a/makesrc.sh
+++ b/makesrc.sh
@@ -8,21 +8,29 @@ PREVER=$(sed -n '/^%global upstream_prever/{s/.* //;p}' $NAME.spec)
COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec)
SHORT=${COMMIT:0:7}
-echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION$PREVER\n"
+if [ -f $NAME-$VERSION$PREVER-$SHORT.tgz ]; then
+ echo skip $NAME-$VERSION$PREVER-$SHORT.tgz already here
+else
+ echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION$PREVER\n"
-echo "Cloning..."
-git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
+ echo "Cloning..."
+ git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
-echo "Getting commit..."
-pushd $PROJECT-$COMMIT
-git checkout $COMMIT
-cp composer.json ../composer.json
-popd
+ echo "Getting commit..."
+ pushd $PROJECT-$COMMIT
+ git checkout $COMMIT || exit 1
+ cp composer.json ../composer.json
+ composer config platform.php 7.4
+ rm composer.lock
+ export COMPOSER_VENDOR_DIR=src/Composer/vendor
+ composer install --no-interaction --no-progress --no-dev --optimize-autoloader
+ cp src/Composer/vendor/composer/installed.json ../
+ popd
-echo "Archiving..."
-tar czf $NAME-$VERSION$PREVER-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
-
-echo "Cleaning..."
-rm -rf $PROJECT-$COMMIT
+ echo "Archiving..."
+ tar czf $NAME-$VERSION$PREVER-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
+ echo "Cleaning..."
+ rm -rf $PROJECT-$COMMIT
+fi
echo "Done."