summaryrefslogtreecommitdiffstats
path: root/makesrc.sh
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-10-02 17:02:55 +0200
committerRemi Collet <remi@remirepo.net>2017-10-02 17:02:55 +0200
commit5d4b5c5aced39ac72095dddff7f6066d61a5c4a4 (patch)
treefd9d4fb575bbc2652e11517379ae327aa529f22d /makesrc.sh
parente7c64fc775ccb53291f4cc0dd77e9255970abc34 (diff)
Update to 2.7.0
drop dependency on sebastian/diff, bundle fork instead
Diffstat (limited to 'makesrc.sh')
-rwxr-xr-xmakesrc.sh26
1 files changed, 25 insertions, 1 deletions
diff --git a/makesrc.sh b/makesrc.sh
index c047df5..d5a6236 100755
--- a/makesrc.sh
+++ b/makesrc.sh
@@ -7,7 +7,7 @@ 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\n"
+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
@@ -24,4 +24,28 @@ tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
echo "Cleaning..."
rm -rf $PROJECT-$COMMIT
+PROJECT=diff
+OWNER=$(sed -n '/^%global gh_diff_owner/{s/.* //;p}' $NAME.spec)
+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"
+
+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 "Archiving..."
+tar czf $NAME-$PROJECT-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
+
+echo "Cleaning..."
+rm -rf $PROJECT-$COMMIT
+
echo "Done."
+