summaryrefslogtreecommitdiffstats
path: root/commitpkg.in
diff options
context:
space:
mode:
Diffstat (limited to 'commitpkg.in')
-rw-r--r--commitpkg.in85
1 files changed, 28 insertions, 57 deletions
diff --git a/commitpkg.in b/commitpkg.in
index 83976bd..40ba887 100644
--- a/commitpkg.in
+++ b/commitpkg.in
@@ -56,22 +56,24 @@ case "$cmd" in
esac
# check if all local source files are under version control
-for s in "${source[@]}"; do
- if [[ $s != *://* ]] && ! svn status -v "$s@" | grep -q '^[ AMRX~]'; then
- die "$s is not under version control"
- fi
-done
+# TODO: FIXME: check if files are in git
+#for s in "${source[@]}"; do
+ #if [[ $s != *://* ]] && ! svn status -v "$s@" | grep -q '^[ AMRX~]'; then
+ #die "$s is not under version control"
+ #fi
+#done
# check if changelog and install files are under version control
-for i in 'changelog' 'install'; do
- while read -r file; do
- # evaluate any bash variables used
- eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
- if ! svn status -v "${file}" | grep -q '^[ AMRX~]'; then
- die "${file} is not under version control"
- fi
- done < <(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD)
-done
+# TODO: FIXME: check if files are in git
+#for i in 'changelog' 'install'; do
+ #while read -r file; do
+ ## evaluate any bash variables used
+ #eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
+ #if ! svn status -v "${file}" | grep -q '^[ AMRX~]'; then
+ #die "${file} is not under version control"
+ #fi
+ #done < <(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD)
+#done
rsyncopts=(-e ssh -p --chmod=ug=rw,o=r -c -h -L --progress --partial -y)
archreleaseopts=()
@@ -107,37 +109,26 @@ done
if [[ -z $server ]]; then
case "$repo" in
core|extra|testing|staging|kde-unstable|gnome-unstable)
- server='gerolde.archlinux.org' ;;
+ server='localhost' ;;
community*|multilib*)
- server='aur.archlinux.org' ;;
+ server='localhost' ;;
*)
server='gerolde.archlinux.org'
msg "Non-standard repository $repo in use, defaulting to server $server" ;;
esac
fi
-if [[ -n $(svn status -q) ]]; then
+if [[ -n $(git status -s | grep -v "^?? ") ]]; then
msgtemplate="upgpkg: $pkgbase $(get_full_version)"$'\n\n'
if [[ -n $1 ]]; then
- stat_busy 'Committing changes to trunk'
- svn commit -q -m "${msgtemplate}${1}" || die
+ stat_busy 'Committing changes'
+ git commit -a -q -m "${msgtemplate}${1}" || die
+ git tag "$(get_full_version)" || die
stat_done
else
- msgfile="$(mktemp)"
- echo "$msgtemplate" > "$msgfile"
- if [[ -n $SVN_EDITOR ]]; then
- $SVN_EDITOR "$msgfile"
- elif [[ -n $VISUAL ]]; then
- $VISUAL "$msgfile"
- elif [[ -n $EDITOR ]]; then
- $EDITOR "$msgfile"
- else
- vi "$msgfile"
- fi
- [[ -s $msgfile ]] || die
stat_busy 'Committing changes to trunk'
- svn commit -q -F "$msgfile" || die
- unlink "$msgfile"
+ echo "$msgtemplate" | git commit -a -q -e -F - || die
+ git tag "$(get_full_version)" || die
stat_done
fi
fi
@@ -184,9 +175,9 @@ for _arch in ${arch[@]}; do
fi
done
-if [[ ${#commit_arches[*]} -gt 0 ]]; then
- archrelease "${archreleaseopts[@]}" "${commit_arches[@]/#/$repo-}" || die
-fi
+#if [[ ${#commit_arches[*]} -gt 0 ]]; then
+ #archrelease "${archreleaseopts[@]}" "${commit_arches[@]/#/$repo-}" || die
+#fi
if [[ ${#uploads[*]} -gt 0 ]]; then
new_uploads=()
@@ -199,26 +190,6 @@ if [[ ${#uploads[*]} -gt 0 ]]; then
uploads=("${new_uploads[@]}")
unset new_uploads
msg 'Uploading all package and signature files'
- rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || die
+ rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:arch/git-pkgs-test/staging/$repo/" || die
fi
-if [[ "${arch[*]}" == 'any' ]]; then
- if [[ -d ../repos/$repo-i686 && -d ../repos/$repo-x86_64 ]]; then
- pushd ../repos/ >/dev/null
- stat_busy "Removing $repo-i686 and $repo-x86_64"
- svn rm -q $repo-i686
- svn rm -q $repo-x86_64
- svn commit -q -m "Removed $repo-i686 and $repo-x86_64 for $pkgname"
- stat_done
- popd >/dev/null
- fi
-else
- if [[ -d ../repos/$repo-any ]]; then
- pushd ../repos/ >/dev/null
- stat_busy "Removing $repo-any"
- svn rm -q $repo-any
- svn commit -q -m "Removed $repo-any for $pkgname"
- stat_done
- popd >/dev/null
- fi
-fi