Codebase list rust-stfu8 / a2ba87f dev / mass-source-upload.sh
a2ba87f

Tree @a2ba87f (Download .tar.gz)

mass-source-upload.sh @a2ba87fraw · history · blame

#!/bin/bash
# Mass upload

set -e
BASE_DIR=$(pwd)

if test ! -f LIST_UPLOAD.txt; then
	echo "Could not find LIST_UPLOAD.txt"
	echo "Run python3 dev/rust-excuses-source-upload.py > LIST_UPLOAD.txt"
	exit 1
fi

for f in $(awk '{print $1}' LIST_UPLOAD.txt|sed -e "s|rust-||g"); do
	h=$(head -1 src/$f/debian/changelog)
	if echo $h|grep UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; then
		echo "skip $f"
		continue
	else
		git branch -D pending-$f || true
		V=$(dpkg-parsechangelog --file src/$f/debian/changelog|grep Version|awk '{print $2}'|cut -d- -f1)
		PKG=$(grep Upstream-Name src/$f/debian/copyright|awk '{print $2}')
		REALVER=$V ./update.sh $PKG
		git commit -m" $f: source upload" src/$f
		RERELEASE=1 ./release.sh $PKG
		git checkout master && git merge origin/pending-$f
		git branch -d pending-$f
	fi
	cd $BASE_DIR
done