diff options
author | Sascha Silbe <silbe@buildslave-debian-squeeze-64bit.sugarlabs.org> | 2010-06-13 10:49:16 (GMT) |
---|---|---|
committer | Sascha Silbe <silbe@buildslave-debian-squeeze-64bit.sugarlabs.org> | 2010-06-13 10:53:02 (GMT) |
commit | 75e046dde49c6e281dd3b3fa31945c22a903cbe9 (patch) | |
tree | 4754a21d376533c76b99a5acba8c2dbaa3d13b5e | |
parent | c56f1f41b1c2d8949a25d317f6cf43f2eb8f0e47 (diff) |
list upstream git changes in debian/changelog
-rwxr-xr-x | build-snapshots | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/build-snapshots b/build-snapshots index 712b545..031d9fa 100755 --- a/build-snapshots +++ b/build-snapshots @@ -5,19 +5,26 @@ repo_clean() { } repo_update() { + git fetch origin + git fetch upstream git checkout upstream - git pull upstream master + git reset --hard origin/upstream + git merge upstream/master git checkout master - git pull origin master - git pull . upstream + git reset --hard origin/master + git merge upstream +} + +append_git_changelog() { + local range="${1}" + git log --pretty=format:'[%h] %s (%an)' "${range}" |xargs -L 1 --no-run-if-empty dch } version_set() { - local version="$(git tag|grep ^v|tr -d v|sort -t . -n|tail -n 1)" - local commit="$(git rev-parse upstream)" - dch -v "${version}-git$(date +%Y%m%d)-1" "Nightly snapshot build. Last commit ${commit}." -# git-dch --snapshot --auto - git commit -m "Add changelog entry for nightly snapshot build (commit ${commit})" debian/changelog + local upstream_version="$(git tag|grep ^v|tr -d v|sort -t . -n|tail -n 1)" + dch --newversion "${upstream_version}-git$(date +%Y%m%d)-1" --preserve --distribution testing "Nightly snapshot package" + append_git_changelog origin/master..upstream/master + git commit -m "Add changelog entry for nightly snapshot build" debian/changelog } gen_and_import_tarball() { |