summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Poignant <oliver@poignant.se>2016-03-06 21:05:20 +0100
committerOliver Poignant <oliver@poignant.se>2016-03-06 21:05:20 +0100
commit3f7a830cdadc82f10bad26b060f2701ed08b34a9 (patch)
treee62af59711f37b88e64b6155aaa57904c3f3e7c7
parentec1f2a28c902855aa470f8523eea33f8aed6a2b5 (diff)
downloadGit-Auto-Deploy-3f7a830cdadc82f10bad26b060f2701ed08b34a9.zip
Git-Auto-Deploy-3f7a830cdadc82f10bad26b060f2701ed08b34a9.tar.gz
Git-Auto-Deploy-3f7a830cdadc82f10bad26b060f2701ed08b34a9.tar.bz2
Moved files around into new project structure
-rwxr-xr-xGitAutoDeploy.py16
-rwxr-xr-xbin/git-auto-deploy9
-rw-r--r--gitautodeploy/__init__.py (renamed from GitAutoDeploy/__init__.py)2
-rw-r--r--gitautodeploy/__main__.py5
-rw-r--r--gitautodeploy/exceptions.py (renamed from GitAutoDeploy/exceptions.py)0
-rw-r--r--gitautodeploy/gitautodeploy.py (renamed from GitAutoDeploy/gitautodeploy.py)16
-rw-r--r--gitautodeploy/lock.py (renamed from GitAutoDeploy/lock.py)0
-rw-r--r--gitautodeploy/parsers/WebhookRequestParser.py (renamed from GitAutoDeploy/parsers/WebhookRequestParser.py)0
-rw-r--r--gitautodeploy/parsers/__init__.py (renamed from GitAutoDeploy/parsers/__init__.py)0
-rw-r--r--gitautodeploy/parsers/bitbucket.py (renamed from GitAutoDeploy/parsers/bitbucket.py)0
-rw-r--r--gitautodeploy/parsers/generic.py (renamed from GitAutoDeploy/parsers/generic.py)0
-rw-r--r--gitautodeploy/parsers/github.py (renamed from GitAutoDeploy/parsers/github.py)0
-rw-r--r--gitautodeploy/parsers/gitlab.py (renamed from GitAutoDeploy/parsers/gitlab.py)0
-rw-r--r--gitautodeploy/parsers/gitlabci.py (renamed from GitAutoDeploy/parsers/gitlabci.py)0
-rw-r--r--gitautodeploy/wrappers/__init__.py (renamed from GitAutoDeploy/wrappers/__init__.py)0
-rw-r--r--gitautodeploy/wrappers/git.py (renamed from GitAutoDeploy/wrappers/git.py)0
-rw-r--r--gitautodeploy/wrappers/process.py (renamed from GitAutoDeploy/wrappers/process.py)0
17 files changed, 35 insertions, 13 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py
index 0fd00ea..8816923 100755
--- a/GitAutoDeploy.py
+++ b/GitAutoDeploy.py
@@ -1,14 +1,8 @@
#!/usr/bin/env python
if __name__ == '__main__':
- import signal
- from GitAutoDeploy import GitAutoDeploy
-
- app = GitAutoDeploy()
-
- signal.signal(signal.SIGHUP, app.signal_handler)
- signal.signal(signal.SIGINT, app.signal_handler)
- signal.signal(signal.SIGABRT, app.signal_handler)
- signal.signal(signal.SIGPIPE, signal.SIG_IGN)
-
- app.run()
+ import sys
+ import os
+ import gitautodeploy
+ sys.stderr.write("\033[1;33m[WARNING]\033[0;33m GitAutoDeploy.py is deprecated. Please use \033[1;33m'bin/gitautodeploy%s'\033[0;33m instead.\033[0m\n" % (' ' + ' '.join(sys.argv[1:])).strip())
+ gitautodeploy.main()
diff --git a/bin/git-auto-deploy b/bin/git-auto-deploy
new file mode 100755
index 0000000..0d3e492
--- /dev/null
+++ b/bin/git-auto-deploy
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+
+if __name__ == '__main__':
+ import sys
+ import os
+ sys.path.append(os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../')))
+ import gitautodeploy
+
+ gitautodeploy.main()
diff --git a/GitAutoDeploy/__init__.py b/gitautodeploy/__init__.py
index 2c3881a..b870eda 100644
--- a/GitAutoDeploy/__init__.py
+++ b/gitautodeploy/__init__.py
@@ -2,4 +2,4 @@ from wrappers import *
from lock import *
from parsers import *
from gitautodeploy import *
-from exceptions import * \ No newline at end of file
+from exceptions import *
diff --git a/gitautodeploy/__main__.py b/gitautodeploy/__main__.py
new file mode 100644
index 0000000..f97e44f
--- /dev/null
+++ b/gitautodeploy/__main__.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python
+from gitautodeploy import main
+
+if __name__ == '__main__':
+ main()
diff --git a/GitAutoDeploy/exceptions.py b/gitautodeploy/exceptions.py
index a4c10c0..a4c10c0 100644
--- a/GitAutoDeploy/exceptions.py
+++ b/gitautodeploy/exceptions.py
diff --git a/GitAutoDeploy/gitautodeploy.py b/gitautodeploy/gitautodeploy.py
index 5a00845..07677fe 100644
--- a/GitAutoDeploy/gitautodeploy.py
+++ b/gitautodeploy/gitautodeploy.py
@@ -713,4 +713,18 @@ class GitAutoDeploy(object):
elif signum == 6:
logger.info('Requested close by SIGABRT (process abort signal). Code 6.')
- self.exit() \ No newline at end of file
+ self.exit()
+
+
+def main():
+ import signal
+ from gitautodeploy import GitAutoDeploy
+
+ app = GitAutoDeploy()
+
+ signal.signal(signal.SIGHUP, app.signal_handler)
+ signal.signal(signal.SIGINT, app.signal_handler)
+ signal.signal(signal.SIGABRT, app.signal_handler)
+ signal.signal(signal.SIGPIPE, signal.SIG_IGN)
+
+ app.run() \ No newline at end of file
diff --git a/GitAutoDeploy/lock.py b/gitautodeploy/lock.py
index 8bd8b32..8bd8b32 100644
--- a/GitAutoDeploy/lock.py
+++ b/gitautodeploy/lock.py
diff --git a/GitAutoDeploy/parsers/WebhookRequestParser.py b/gitautodeploy/parsers/WebhookRequestParser.py
index 42cbbdd..42cbbdd 100644
--- a/GitAutoDeploy/parsers/WebhookRequestParser.py
+++ b/gitautodeploy/parsers/WebhookRequestParser.py
diff --git a/GitAutoDeploy/parsers/__init__.py b/gitautodeploy/parsers/__init__.py
index 59d2b50..59d2b50 100644
--- a/GitAutoDeploy/parsers/__init__.py
+++ b/gitautodeploy/parsers/__init__.py
diff --git a/GitAutoDeploy/parsers/bitbucket.py b/gitautodeploy/parsers/bitbucket.py
index b02a6ac..b02a6ac 100644
--- a/GitAutoDeploy/parsers/bitbucket.py
+++ b/gitautodeploy/parsers/bitbucket.py
diff --git a/GitAutoDeploy/parsers/generic.py b/gitautodeploy/parsers/generic.py
index cb83a71..cb83a71 100644
--- a/GitAutoDeploy/parsers/generic.py
+++ b/gitautodeploy/parsers/generic.py
diff --git a/GitAutoDeploy/parsers/github.py b/gitautodeploy/parsers/github.py
index bd20b98..bd20b98 100644
--- a/GitAutoDeploy/parsers/github.py
+++ b/gitautodeploy/parsers/github.py
diff --git a/GitAutoDeploy/parsers/gitlab.py b/gitautodeploy/parsers/gitlab.py
index 7a8e374..7a8e374 100644
--- a/GitAutoDeploy/parsers/gitlab.py
+++ b/gitautodeploy/parsers/gitlab.py
diff --git a/GitAutoDeploy/parsers/gitlabci.py b/gitautodeploy/parsers/gitlabci.py
index 9fc66be..9fc66be 100644
--- a/GitAutoDeploy/parsers/gitlabci.py
+++ b/gitautodeploy/parsers/gitlabci.py
diff --git a/GitAutoDeploy/wrappers/__init__.py b/gitautodeploy/wrappers/__init__.py
index d7df44b..d7df44b 100644
--- a/GitAutoDeploy/wrappers/__init__.py
+++ b/gitautodeploy/wrappers/__init__.py
diff --git a/GitAutoDeploy/wrappers/git.py b/gitautodeploy/wrappers/git.py
index 04ec94a..04ec94a 100644
--- a/GitAutoDeploy/wrappers/git.py
+++ b/gitautodeploy/wrappers/git.py
diff --git a/GitAutoDeploy/wrappers/process.py b/gitautodeploy/wrappers/process.py
index 30adc36..30adc36 100644
--- a/GitAutoDeploy/wrappers/process.py
+++ b/gitautodeploy/wrappers/process.py