From 9d818673a3ec2d8a939a6e53e61ccdaba8a222a6 Mon Sep 17 00:00:00 2001
From: Yuanle Song <sylecn@gmail.com>
Date: Thu, 28 Feb 2019 17:37:43 +0800
Subject: [PATCH] v1.5.3 make utils/trigger-ci-build a noop.

previously it was trying to call jenkins api, which I haven't used for
years. replaced it with an empty shell script with some comments.
---
 project.clj                                          | 2 +-
 src/leiningen/new/python.clj                         | 2 +-
 src/leiningen/new/python/README-dev.rst              | 8 ++++++++
 src/leiningen/new/python/git-hooks/post-commit       | 2 +-
 src/leiningen/new/python/git-hooks/post-merge        | 2 +-
 src/leiningen/new/python/utils/trigger-ci-build      | 4 ++++
 src/leiningen/new/python/utils/trigger-jenkins-build | 6 ------
 7 files changed, 16 insertions(+), 10 deletions(-)
 create mode 100755 src/leiningen/new/python/utils/trigger-ci-build
 delete mode 100755 src/leiningen/new/python/utils/trigger-jenkins-build

diff --git a/project.clj b/project.clj
index fb6d0ea..0bc56f6 100644
--- a/project.clj
+++ b/project.clj
@@ -1,4 +1,4 @@
-(defproject python/lein-template "1.5.2"
+(defproject python/lein-template "1.5.3"
   :description "lein template for a python project"
   :url "https://blog.emacsos.com/python-project-template"
   :license {:name "Eclipse Public License"
diff --git a/src/leiningen/new/python.clj b/src/leiningen/new/python.clj
index 613e556..e3269ee 100644
--- a/src/leiningen/new/python.clj
+++ b/src/leiningen/new/python.clj
@@ -54,7 +54,7 @@
                         "utils/versionutils.py"
                         "utils/build-deb"
                         "utils/install-git-hooks"
-                        "utils/trigger-jenkins-build"
+                        "utils/trigger-ci-build"
                         "deb-scripts/before-install.sh"
                         "deb-scripts/after-install.sh"
                         "deb-scripts/before-remove.sh"
diff --git a/src/leiningen/new/python/README-dev.rst b/src/leiningen/new/python/README-dev.rst
index 895485d..335163d 100644
--- a/src/leiningen/new/python/README-dev.rst
+++ b/src/leiningen/new/python/README-dev.rst
@@ -84,3 +84,11 @@ How to run tests and deploy projects
   other environment, the app.yaml template should be updated to fit in the
   environment.
 
+How to add git commit hooks etc
+---------------------------------
+
+Using git pre-commit hook is a good idea.
+
+.. code-block:: bash
+
+   make install-git-hooks
diff --git a/src/leiningen/new/python/git-hooks/post-commit b/src/leiningen/new/python/git-hooks/post-commit
index 9f9d2b3..6806d0e 100755
--- a/src/leiningen/new/python/git-hooks/post-commit
+++ b/src/leiningen/new/python/git-hooks/post-commit
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-./utils/trigger-jenkins-build
+./utils/trigger-ci-build
diff --git a/src/leiningen/new/python/git-hooks/post-merge b/src/leiningen/new/python/git-hooks/post-merge
index 9f9d2b3..6806d0e 100755
--- a/src/leiningen/new/python/git-hooks/post-merge
+++ b/src/leiningen/new/python/git-hooks/post-merge
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-./utils/trigger-jenkins-build
+./utils/trigger-ci-build
diff --git a/src/leiningen/new/python/utils/trigger-ci-build b/src/leiningen/new/python/utils/trigger-ci-build
new file mode 100755
index 0000000..5805368
--- /dev/null
+++ b/src/leiningen/new/python/utils/trigger-ci-build
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# you can trigger a CI build in this script.
+# nowadays most CI trigger a build themselves when you push commits to server.
diff --git a/src/leiningen/new/python/utils/trigger-jenkins-build b/src/leiningen/new/python/utils/trigger-jenkins-build
deleted file mode 100755
index c482e21..0000000
--- a/src/leiningen/new/python/utils/trigger-jenkins-build
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-URL='http://localhost:50010/job/{{name}}/build?delay=0sec'
-
-echo "Run Jenkins build at $URL"
-curl "$URL"
-- 
GitLab