diff options
Diffstat (limited to 'archrelease.in')
-rw-r--r-- | archrelease.in | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/archrelease.in b/archrelease.in index 6f52dbc..bac4041 100644 --- a/archrelease.in +++ b/archrelease.in @@ -56,31 +56,30 @@ done # gracefully handle files containing an "@" character known_files=("${known_files[@]/%/@}") +tag=$(get_full_version $_pkgname) + +stat_busy "Copying ${trunk} to ${tag}" + +if [[ -d tags/$tag ]]; then + #declare -a trash + #trash=() + #while read -r file; do + #trash+=("tags/$tag/$file") + #done < <(svn ls "tags/$tag") + #[[ $trash ]] && svn rm -q "${trash[@]/%/@}" + die "already tagged" +else + mkdir -p "tags/$tag" + svn add --parents -q "tags/$tag" +fi -for tag in "$@"; do - stat_busy "Copying ${trunk} to ${tag}" - - if [[ -d repos/$tag ]]; then - declare -a trash - trash=() - while read -r file; do - trash+=("repos/$tag/$file") - done < <(svn ls "repos/$tag") - [[ $trash ]] && svn rm -q "${trash[@]/%/@}" - else - mkdir -p "repos/$tag" - svn add --parents -q "repos/$tag" - fi - - # copy all files at once from trunk to the subdirectory in repos/ - svn copy -q -r HEAD ${known_files[@]/#/$trunk/} "repos/$tag/" +# copy all files at once from trunk to the subdirectory in repos/ +svn copy -q -r HEAD ${known_files[@]/#/$trunk/} "tags/$tag/" - stat_done -done +stat_done stat_busy "Releasing package" -printf -v tag_list ", %s" "$@"; tag_list="${tag_list#, }" -svn commit -q -m "archrelease: copy ${trunk} to $tag_list" || abort +svn commit -q -m "archrelease: copy ${trunk} to $tag" || abort stat_done popd >/dev/null |