From b062c588573a1455ce854670f5c2a41f2e19295c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Dec 2020 09:13:13 +0100 Subject: update to 2.17.1 --- makesrc.sh | 56 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 24 deletions(-) (limited to 'makesrc.sh') diff --git a/makesrc.sh b/makesrc.sh index d5a6236..5284c5c 100755 --- a/makesrc.sh +++ b/makesrc.sh @@ -7,22 +7,26 @@ VERSION=$(sed -n '/^Version:/{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, Commit=$COMMIT\n" +if [ -f $NAME-$VERSION-$SHORT.tgz ]; then + echo "Skip $NAME-$VERSION-$SHORT.tgz" +else + echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION, Commit=$COMMIT\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 || exit1 + cp composer.json ../composer.json + popd -echo "Archiving..." -tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT + echo "Archiving..." + tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT -echo "Cleaning..." -rm -rf $PROJECT-$COMMIT + echo "Cleaning..." + rm -rf $PROJECT-$COMMIT +fi PROJECT=diff OWNER=$(sed -n '/^%global gh_diff_owner/{s/.* //;p}' $NAME.spec) @@ -30,22 +34,26 @@ VERSION=$(sed -n '/^%global gh_diff_version/{s/.* //;p}' $NAME.spec) COMMIT=$(sed -n '/^%global gh_diff_commit/{s/.* //;p}' $NAME.spec) SHORT=${COMMIT:0:7} -echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION, Commit=$COMMIT\n" +if [ -f $NAME-$PROJECT-$VERSION-$SHORT.tgz ]; then + echo "Skip $NAME-$PROJECT-$VERSION-$SHORT.tgz" +else + echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION, Commit=$COMMIT\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-diff.json -popd + echo "Getting commit..." + pushd $PROJECT-$COMMIT + git checkout $COMMIT || exit 1 + cp composer.json ../composer-diff.json + popd -echo "Archiving..." -tar czf $NAME-$PROJECT-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT + echo "Archiving..." + tar czf $NAME-$PROJECT-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT -echo "Cleaning..." -rm -rf $PROJECT-$COMMIT + echo "Cleaning..." + rm -rf $PROJECT-$COMMIT +fi echo "Done." -- cgit