chiark / gitweb /
remove fd-commit, no active devs use it, and requires Auto Name/Name
authorHans-Christoph Steiner <hans@eds.org>
Wed, 6 Dec 2017 21:48:08 +0000 (22:48 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 6 Dec 2017 21:48:08 +0000 (22:48 +0100)
fd-commit and checkupdates both require that there are two name fields,
AutoName: and Name:.  This is only used for the commit messages.  Since the
current devs do it manually, we can remove the fd-commit shell script, then
focus on checkupdates when revamping AutoName/Name.

https://botbot.me/freenode/fdroid-dev/msg/82539152

completion/bash-completion
fd-commit [deleted file]
hooks/pre-commit
setup.py

index d18edd3501d8e17f815f0aee899cd115a6a2f4e1..1a5ac52362bbb63297d720b00a2b1485bd9348c9 100644 (file)
@@ -352,11 +352,6 @@ _fdroid() {
        }
 }
 
-_fd-commit() {
-       __package
-}
-
 complete -F _fdroid fdroid
-complete -F _fd-commit fd-commit
 
 return 0
diff --git a/fd-commit b/fd-commit
deleted file mode 100755 (executable)
index 4f6e969..0000000
--- a/fd-commit
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/bash
-#
-# fd-commit - part of the F-Droid server tools
-# Commits updates to apps, allowing you to edit the commit messages
-#
-# Copyright (C) 2013-2014 Daniel Marti <mvdan@mvdan.cc>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-commands=()
-
-if [ ! -d metadata ]; then
-       if [ -d ../metadata ]; then
-               cd ..
-       else
-               echo "No metadata files found!"
-               exit 2
-       fi
-fi
-
-while read line; do
-
-       case "$line" in
-               *'??'*'metadata/'*'.txt') new=true ;;
-               *'M'*'metadata/'*'.txt') new=false ;;
-               *) continue ;;
-       esac
-
-       file=${line##* }
-       id=${file##*/}
-       id=${id%.txt*}
-
-       if [ $# -gt 0 ]; then
-               case "$@" in
-                       *" $id "*) ;;  # Middle
-                       "$id "*) ;;    # Start
-                       *" $id") ;;    # End
-                       "$id") ;;      # Alone
-                       *) continue ;; # Missing
-               esac
-       fi
-
-       [ -d metadata/$id ] && extra=metadata/$id || extra=
-
-       name= autoname=
-       while read l; do
-               case "$l" in
-                       'Auto Name:'*) autoname=${l#*:} ;;
-                       'Name:'*) name=${l#*:} ;;
-                       'Summary:'*) break ;;
-               esac
-       done < "$file"
-
-       if [ -n "$name" ]; then
-               fullname="$name"
-       elif [ -n "$autoname" ]; then
-               fullname="$autoname"
-       else
-               fullname="$id"
-       fi
-
-       if $new; then
-               message="New app: $fullname"
-       else
-               onlybuild=true
-               newbuild=false
-               disable=false
-               while read line; do
-                       case "$line" in
-                               '-Build:'*) onlybuild=false ;;
-                               '+Build:'*)
-                                       $newbuild && onlybuild=false
-                                       newbuild=true
-                                       build=${line#*:}
-                                       version=${build%%,*}
-                                       build=${build#*,}
-                                       vercode=${build%%,*}
-                                       ;;
-                               '+'*'disable='*)
-                                       $newbuild && $onlybuild && disable=true
-                                       ;;
-                       esac
-               done < <(git diff HEAD -- "$file")
-
-               if $newbuild && $onlybuild; then
-                       if $disable; then
-                               message="Don't update $fullname to $version ($vercode)"
-                       else
-                               message="Update $fullname to $version ($vercode)"
-                       fi
-               else
-                       message="$fullname:"
-               fi
-       fi
-
-       message=${message//\"/\\\"}
-       commands+=("git add -- $file $extra && git commit -m \"$message\" -e -v")
-
-done < <(git status --porcelain metadata)
-
-[ -z "$commands" ] && exit 0
-
-git reset >/dev/null
-for cmd in "${commands[@]}"; do
-       eval "$cmd"
-       git reset >/dev/null
-done
index 2bbfe39c3a5b0df483cc03fa349ece3bd5d700b9..1dcc1d5aeee269568467658c3234a32b876e3e2f 100755 (executable)
@@ -11,7 +11,7 @@ if [ -z "$files" ]; then
     PY_FILES="fdroid makebuildserver setup.py examples/*.py buildserver/*.py fdroidserver/*.py"
     PY_TEST_FILES="tests/*.TestCase"
     SH_FILES="hooks/pre-commit"
-    BASH_FILES="fd-commit jenkins-build-all jenkins-setup-build-environment jenkins-test completion/bash-completion buildserver/provision-*"
+    BASH_FILES="jenkins-build-all jenkins-setup-build-environment jenkins-test completion/bash-completion buildserver/provision-*"
     RB_FILES="buildserver/Vagrantfile"
 else
     # if actually committing right now, then only run on the files
index b7ab51e74ce2c9998196efb5e4f0a13913b4c354..f68ba1b5e43052277467ba38de5ed31550d2e3f2 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,7 @@ setup(name='fdroidserver',
       url='https://f-droid.org',
       license='AGPL-3.0',
       packages=['fdroidserver', 'fdroidserver.asynchronousfilereader'],
-      scripts=['fdroid', 'fd-commit', 'makebuildserver'],
+      scripts=['fdroid', 'makebuildserver'],
       data_files=get_data_files(),
       python_requires='>=3.4',
       cmdclass={'versioncheck': VersionCheckCommand},