]> source.dussan.org Git - gitea.git/commitdiff
Move into packager folder
authorCyril Rohr <cyril.rohr@gmail.com>
Tue, 9 Sep 2014 20:29:39 +0000 (20:29 +0000)
committerCyril Rohr <cyril.rohr@gmail.com>
Tue, 9 Sep 2014 20:29:39 +0000 (20:29 +0000)
.godir [deleted file]
.pkgr.yml
Procfile [deleted file]
packager/.godir [new file with mode: 0644]
packager/Procfile [new file with mode: 0644]
packager/debian/postinst [new file with mode: 0755]
packaging/debian/postinst [deleted file]

diff --git a/.godir b/.godir
deleted file mode 100644 (file)
index ba2906d..0000000
--- a/.godir
+++ /dev/null
@@ -1 +0,0 @@
-main
index f98187807b71cd20806daca5c0cdf8b192bb0d9b..9988ad4d3af27d86d56aa67f89e3db32ea536a09 100644 (file)
--- a/.pkgr.yml
+++ b/.pkgr.yml
@@ -6,6 +6,9 @@ build_dependencies:
   - bzr
 dependencies:
   - git
+before:
+  - mv packager/Procfile .
+  - mv packager/.godir .
 after:
   - mv bin/main gogs
-after_install: ./packaging/debian/postinst
+after_install: ./packager/debian/postinst
diff --git a/Procfile b/Procfile
deleted file mode 100644 (file)
index efa00d2..0000000
--- a/Procfile
+++ /dev/null
@@ -1 +0,0 @@
-web: ./gogs web
diff --git a/packager/.godir b/packager/.godir
new file mode 100644 (file)
index 0000000..ba2906d
--- /dev/null
@@ -0,0 +1 @@
+main
diff --git a/packager/Procfile b/packager/Procfile
new file mode 100644 (file)
index 0000000..efa00d2
--- /dev/null
@@ -0,0 +1 @@
+web: ./gogs web
diff --git a/packager/debian/postinst b/packager/debian/postinst
new file mode 100755 (executable)
index 0000000..90ff2b4
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+APP_NAME="gogs"
+CLI="${APP_NAME}"
+APP_USER=$(${CLI} config:get APP_USER)
+APP_GROUP=$(${CLI} config:get APP_GROUP)
+APP_CONFIG="/etc/${APP_NAME}/conf/app.ini"
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+case "$1" in
+
+  configure)
+    mkdir -p $(dirname ${APP_CONFIG})
+    chown ${APP_USER}.${APP_GROUP} $(dirname ${APP_CONFIG})
+    [ -f ${APP_CONFIG} ] || ${CLI} run cp conf/app.ini ${APP_CONFIG}
+    ${CLI} config:set USER=${APP_USER}
+    ${CLI} config:set GOGS_CUSTOM="/etc/${APP_NAME}"
+    PORT=$(${CLI} config:get PORT || echo "6000")
+    sed -i "s|HTTP_PORT = 3000|HTTP_PORT = ${PORT}|" ${APP_CONFIG}
+    sed -i "s|RUN_USER = git|RUN_USER = ${APP_USER}|" ${APP_CONFIG}
+    sed -i "s|RUN_MODE = dev|RUN_MODE = prod|" ${APP_CONFIG}
+
+    # scale
+    ${CLI} scale web=1 || true
+  ;;
+
+  abort-upgrade|abort-remove|abort-deconfigure)
+    exit 0
+  ;;
+
+  *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+esac
diff --git a/packaging/debian/postinst b/packaging/debian/postinst
deleted file mode 100755 (executable)
index 90ff2b4..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-APP_NAME="gogs"
-CLI="${APP_NAME}"
-APP_USER=$(${CLI} config:get APP_USER)
-APP_GROUP=$(${CLI} config:get APP_GROUP)
-APP_CONFIG="/etc/${APP_NAME}/conf/app.ini"
-
-# source debconf library
-. /usr/share/debconf/confmodule
-
-case "$1" in
-
-  configure)
-    mkdir -p $(dirname ${APP_CONFIG})
-    chown ${APP_USER}.${APP_GROUP} $(dirname ${APP_CONFIG})
-    [ -f ${APP_CONFIG} ] || ${CLI} run cp conf/app.ini ${APP_CONFIG}
-    ${CLI} config:set USER=${APP_USER}
-    ${CLI} config:set GOGS_CUSTOM="/etc/${APP_NAME}"
-    PORT=$(${CLI} config:get PORT || echo "6000")
-    sed -i "s|HTTP_PORT = 3000|HTTP_PORT = ${PORT}|" ${APP_CONFIG}
-    sed -i "s|RUN_USER = git|RUN_USER = ${APP_USER}|" ${APP_CONFIG}
-    sed -i "s|RUN_MODE = dev|RUN_MODE = prod|" ${APP_CONFIG}
-
-    # scale
-    ${CLI} scale web=1 || true
-  ;;
-
-  abort-upgrade|abort-remove|abort-deconfigure)
-    exit 0
-  ;;
-
-  *)
-    echo "postinst called with unknown argument \`$1'" >&2
-    exit 1
-  ;;
-esac