diff options
author | Remi Collet <remi@remirepo.net> | 2018-09-17 14:28:12 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-09-17 14:28:12 +0200 |
commit | 674c0c7cf5f6c9ec5c6be811e1bf8b970a3ba1a1 (patch) | |
tree | ff45ebadd18990a39f4d66313e0d47841f423f0b /makesrc.sh | |
parent | f419697459b2aa7d76561be54251a997a013f54a (diff) |
update to 1.0.7
sources from git snapshot
Diffstat (limited to 'makesrc.sh')
-rwxr-xr-x | makesrc.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..5c1f453 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +NAME=$(basename $PWD) +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global git_commit/{s/.* //;p}' $NAME.spec) +SHORT=${COMMIT:0:7} + +echo -e "\nCreate git snapshot\nName=$NAME, Version=$VERSION\n" + +echo "Cloning..." +rm -rf $NAME-$COMMIT +git clone https://git.kolab.org/diffusion/PNL/php-net_ldap.git $NAME-$COMMIT + +echo "Getting commit..." +pushd $NAME-$COMMIT +git checkout $COMMIT +cp composer.json ../composer.json +popd + +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs $NAME-$COMMIT + +echo "Cleaning..." +rm -rf $NAME-$COMMIT + +echo "Done." |