capitomcat 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -0
- data/README.md +3 -0
- data/lib/capitomcat/tasks/deploy.cap +12 -1
- data/lib/capitomcat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e4edd194bc87052c00dddde2d94c38edd404762a
|
|
4
|
+
data.tar.gz: 326b2322dd4c85b0f5e750961e8862cf744fedce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 222bbf775ebecf1d70999bee2c7d20d3e6158c6310d537622437105ea62b2faea76f83ce8d624225f33c34b07c7f0d1841fe71a0cf89eca8059011556df7791b
|
|
7
|
+
data.tar.gz: 6f0a996fe78075dc9ea0571c43400ff9a13baf2abb22a92f0ef5d0bfe2c62286cbe699fd2662b67048f548d010f26f04cf2dc0eee21afe0e0e86d0407e29fab2
|
data/CHANGES.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Changes
|
|
2
|
+
[1.2.1]: https://github.com/sunggun-yu/capitomcat/releases/tag/v1.2.1
|
|
2
3
|
[1.2.0]: https://github.com/sunggun-yu/capitomcat/releases/tag/v1.2.0
|
|
3
4
|
[1.1.4]: https://github.com/sunggun-yu/capitomcat/releases/tag/v1.1.4
|
|
4
5
|
[1.1.3]: https://github.com/sunggun-yu/capitomcat/releases/tag/v1.1.3
|
|
@@ -9,6 +10,11 @@
|
|
|
9
10
|
[1.0.0]: https://github.com/sunggun-yu/capitomcat/releases/tag/v1.0.0
|
|
10
11
|
[0.0.3]: https://github.com/sunggun-yu/capitomcat/releases/tag/v0.0.3
|
|
11
12
|
|
|
13
|
+
## [v1.2.1][1.2.1]
|
|
14
|
+
* Revert back the executing tomcat command in background. gives choice option whether use background or not
|
|
15
|
+
* It really hard to know which OS is work with pty true/false for tomcat start script. it depends.... please refer to http://capistranorb.com/documentation/faq/why-does-something-work-in-my-ssh-session-but-not-in-capistrano/
|
|
16
|
+
* Some of the OS only works with background script. ex) CentOS 5.6
|
|
17
|
+
|
|
12
18
|
## [v1.2.0][1.2.0]
|
|
13
19
|
* Updating Capistrano dependency version.
|
|
14
20
|
* Removing background executing of tomcat command. also, sleep time has removed accordingly.
|
data/README.md
CHANGED
|
@@ -76,6 +76,9 @@ set :tomcat_war_file, '/var/app/war/test-web.war'
|
|
|
76
76
|
set :tomcat_context_path, '/test-web'
|
|
77
77
|
set :tomcat_context_file, '/var/lib/tomcat7/conf/Catalina/localhost/test-web.xml'
|
|
78
78
|
set :tomcat_work_dir, '/var/lib/tomcat7/work/Catalina/localhost/test-web'
|
|
79
|
+
set :tomcat_cmd_wait_start, 10 # Second
|
|
80
|
+
set :tomcat_cmd_wait_stop, 5 # Second
|
|
81
|
+
set :use_background_tomcat_cmd, false # Use normal execute command as default
|
|
79
82
|
|
|
80
83
|
# Deploy setting section
|
|
81
84
|
set :local_war_file, '/tmp/test-web.war'
|
|
@@ -25,6 +25,7 @@ namespace :capitomcat do
|
|
|
25
25
|
set :tomcat_work_dir, '/var/lib/tomcat7/work/Catalina/localhost/test-web'
|
|
26
26
|
set :tomcat_cmd_wait_start, 10 # Second
|
|
27
27
|
set :tomcat_cmd_wait_stop, 5 # Second
|
|
28
|
+
set :use_background_tomcat_cmd, false # Use normal execute command as default
|
|
28
29
|
|
|
29
30
|
# Deploy setting section
|
|
30
31
|
set :local_war_file, '/tmp/test-web.war'
|
|
@@ -287,8 +288,18 @@ namespace :capitomcat do
|
|
|
287
288
|
# it executes the Tomcat command in background. and sleeps for several sec after executing.
|
|
288
289
|
def execute_tomcat_cmd(arg)
|
|
289
290
|
# local variables
|
|
291
|
+
puts "use_background_tomcat_cmd --> #{fetch(:use_background_tomcat_cmd)}"
|
|
292
|
+
use_background = if fetch(:use_background_tomcat_cmd).to_s.length > 0
|
|
293
|
+
fetch(:use_background_tomcat_cmd).to_bool
|
|
294
|
+
else
|
|
295
|
+
true # Default is use background command which force not attaching tty(tty=UNKNOWN)
|
|
296
|
+
end
|
|
290
297
|
tomcat_cmd = fetch(:tomcat_cmd)
|
|
291
|
-
|
|
298
|
+
if use_background
|
|
299
|
+
execute("echo `nohup sudo #{get_sudo_user_tomcat_cmd} #{tomcat_cmd} #{arg}& > /dev/null 2>&1` && sleep 1")
|
|
300
|
+
else
|
|
301
|
+
execute :sudo, get_sudo_user_tomcat_cmd, tomcat_cmd, arg
|
|
302
|
+
end
|
|
292
303
|
end
|
|
293
304
|
|
|
294
305
|
# Test if dir is existing
|
data/lib/capitomcat/version.rb
CHANGED