makepkg/makepkg

48 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-06-22 11:59:36 +02:00
#!/bin/bash
GITPACKAGE=~/git/eole/git-package/git-package
export EDITOR=/bin/true
2020-09-29 13:49:29 +02:00
MASTER=2.8.1
2021-07-16 09:20:06 +02:00
MASTER_DEV=false
2020-06-22 11:59:36 +02:00
MASTER_INSTABLE=2.8
INSTABLE_27=2.7.3
CURRENT_REF=$(git symbolic-ref -q HEAD)
CURRENT_BRANCH=$(echo "$CURRENT_REF" | awk -F'/' '{ print $3 }')
CURRENT_SUBBR=$(echo "$CURRENT_REF" | awk -F'/' '{ print $4 }')
echo $CURRENT_BRANCH
if [ "$CURRENT_BRANCH" = "master" ]; then
VERSION=$MASTER
2021-07-16 09:20:06 +02:00
ORI_BR=master
2020-06-22 11:59:36 +02:00
else
VERSION=$CURRENT_BRANCH
if [ ! "$CURRENT_SUBBR" = 'master' ]; then
echo "impossible de déterminer la branche"
exit 1
fi
2021-07-16 09:20:06 +02:00
ORI_BR=$VERSION/master
2020-06-22 11:59:36 +02:00
fi
set -e
2021-07-16 09:20:06 +02:00
if [ $MASTER_DEV = true ] && [ $VERSION = $MASTER ]; then
2020-06-22 11:59:36 +02:00
DEPOT=eole-$MASTER_INSTABLE/unstable
elif [ $VERSION = $INSTABLE_27 ]; then
ORI_BR=$VERSION/master
DEPOT=eole-2.7/unstable
else
DEPOT=eole-$VERSION/proposed-updates
fi
2021-07-16 09:20:06 +02:00
echo "attention version $VERSION ($DEPOT)"
2020-06-22 11:59:36 +02:00
DIST_BR=dist/eole/$VERSION/master
git push
git checkout $DIST_BR
git pull --rebase
git merge $ORI_BR
git push
yes | $GITPACKAGE -b -d $DEPOT
git checkout $ORI_BR
git branch -d $DIST_BR