This repository has been archived by the owner on Feb 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ added scripts for triggering build system: * build.sh creates changelog entry, commit and tag. Can also push everything to origin * push.sh pushes specified version to origin * unbuild.sh resets changes done by build.sh + if you want scripts to be fully automated set DEBFULLNAME and DEBEMAIL system variables. Otherwise changelog could be invalid.
- Loading branch information
Showing
3 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
|
||
fail() { | ||
|
||
echo | ||
echo " FATAL ERROR - building terminated " | ||
echo | ||
exit $1 | ||
} | ||
|
||
do_build() { | ||
dist=$1 | ||
ver=$2 | ||
echo | ||
echo " ====== Building: $dist $ver ====== " | ||
echo | ||
dch -v $ver -D $dist --force-distribution building $dist || fail $? | ||
git add debian/changelog | ||
git commit -m "building $dist" || fail $? | ||
git tag $ver || fail $? | ||
} | ||
|
||
do_push() { | ||
git push || fail $? | ||
git push origin $ver || fail $? | ||
} | ||
|
||
do_usage() { | ||
echo "Usage:" | ||
echo " $0 [-p] <distribution> <version>" | ||
echo | ||
echo -e " -p\tpush to origin" | ||
echo | ||
echo " distribution 'all' will create tags for all distributions" | ||
exit 0 | ||
} | ||
|
||
push=0 | ||
|
||
if [ $# -eq 3 ] | ||
then | ||
if [ $1 == '-p' ] | ||
then | ||
push=1 | ||
shift | ||
else | ||
do_usage | ||
fi | ||
elif [ $# -ne 2 ] | ||
then | ||
do_usage | ||
fi | ||
|
||
dists=$1 | ||
|
||
if [ $dists = "all" ] | ||
then | ||
dists="lenny squeeze unstable natty oneiric" | ||
fi | ||
|
||
version=$2 | ||
|
||
for d in $dists | ||
do | ||
do_build $d $version | ||
if [ $push -eq 1 ] | ||
then | ||
do_push $d $version | ||
fi | ||
|
||
suffix=${version##*.} | ||
let "suffix += 1" | ||
version=${version%.*}.$suffix | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
fail() { | ||
|
||
echo | ||
echo " FATAL ERROR - pushing terminated " | ||
echo | ||
exit $1 | ||
} | ||
|
||
if [ $# -ne 2 ] | ||
then | ||
echo "Usage:" | ||
echo " $0 <version>" | ||
exit 0 | ||
fi | ||
|
||
ver=$2 | ||
|
||
git push || fail $? | ||
git push origin $ver || fail $? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
fail() { | ||
|
||
echo | ||
echo " FATAL ERROR - unbuildin terminated " | ||
echo | ||
exit $1 | ||
} | ||
|
||
if [ $# -ne 1 ] | ||
then | ||
echo "Usage:" | ||
echo " $0 <version>" | ||
exit 0 | ||
fi | ||
|
||
ver=$1 | ||
|
||
git reset $ver~1 || fail $? | ||
git checkout debian/changelog || fail $? | ||
git tag -d $ver || fail $? | ||
|