add a script to do massive upload for source upload
Sylvestre Ledru
3 years ago
0 | #!/bin/bash | |
1 | # Mass upload | |
2 | ||
3 | set -e | |
4 | BASE_DIR=$(pwd) | |
5 | ||
6 | if test ! -f LIST_UPLOAD.txt; then | |
7 | echo "Could not find LIST_UPLOAD.txt" | |
8 | echo "Run python3 dev/rust-excuses-source-upload.py > LIST_UPLOAD.txt" | |
9 | exit 1 | |
10 | fi | |
11 | ||
12 | for f in $(awk '{print $1}' LIST_UPLOAD.txt|sed -e "s|rust-||g"); do | |
13 | h=$(head -1 src/$f/debian/changelog) | |
14 | if echo $h|grep UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; then | |
15 | echo "skip $f" | |
16 | continue | |
17 | else | |
18 | git branch -D pending-$f || true | |
19 | V=$(dpkg-parsechangelog --file src/$f/debian/changelog|grep Version|awk '{print $2}'|cut -d- -f1) | |
20 | PKG=$(grep Upstream-Name src/$f/debian/copyright|awk '{print $2}') | |
21 | REALVER=$V ./update.sh $PKG | |
22 | git commit -m" $f: source upload" src/$f | |
23 | RERELEASE=1 ./release.sh $PKG | |
24 | git checkout master && git merge origin/pending-$f | |
25 | git branch -d pending-$f | |
26 | fi | |
27 | cd $BASE_DIR | |
28 | done |