Repository: logging-log4cxx Updated Branches: refs/heads/release_scripts 3ca47c80a -> 85583f525
Revert pom.xml and changes.xml. Project: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/commit/928ea24d Tree: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/tree/928ea24d Diff: http://git-wip-us.apache.org/repos/asf/logging-log4cxx/diff/928ea24d Branch: refs/heads/release_scripts Commit: 928ea24d12354b0edda2ca0b4fbc481a4ce2131e Parents: 3ca47c8 Author: Thorsten Schöning <[email protected]> Authored: Thu Aug 17 10:33:55 2017 +0200 Committer: Thorsten Schöning <[email protected]> Committed: Thu Aug 17 10:33:55 2017 +0200 ---------------------------------------------------------------------- releasePurge.sh | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4cxx/blob/928ea24d/releasePurge.sh ---------------------------------------------------------------------- diff --git a/releasePurge.sh b/releasePurge.sh index 9d9dca6..035488d 100755 --- a/releasePurge.sh +++ b/releasePurge.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash -e # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -21,8 +21,38 @@ # This script is mainly used during development of the release scripts itself and simply deletes # branches and tags created during tests of the release process. Be very careful with execution! # -git checkout "release_scripts" -git branch -D "next_stable" -git tag --delete "v0.11.0-RC1" -git push --delete "origin" "next_stable" -git push --delete "origin" "v0.11.0-RC1" + +function main() +{ + #purge_branch_and_tag + revert_pom_and_changes +} + +function purge_branch_and_tag() +{ + git checkout "release_scripts" + git branch -D "next_stable" + git tag --delete "v0.11.0-RC1" + git push --delete "origin" "next_stable" + git push --delete "origin" "v0.11.0-RC1" +} + +function revert_pom_and_changes() +{ + sed -i -r "s/^\t(<version>).+(<)/\10.11.0-SNAPSHOT\2/" "pom.xml" + sed -i -r "1,/.+<release.+/ s/.+<release.+//" "src/changes/changes.xml" + sed -i -r "1,/.+date=.+/ s/.+date=.+//" "src/changes/changes.xml" + sed -i -r "1,/.+description=.+/ s/.+description=.+//" "src/changes/changes.xml" + sed -i -r "1,/.+<\/release.+/ s/.+<\/release.+//" "src/changes/changes.xml" + + # Don't know ho to remove the created newlines in changes easier... + local changes=$(cat "src/changes/changes.xml") + echo "${changes/$'\n\n\n\n\n'/}" > "src/changes/changes.xml" + + #git add "pom.xml" + #git add "src/changes/changes_xml" + + #git commit -m "No 0.11.1 yet." +} + +main
