Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4abd3ebedb | ||
|
|
f765436dde | ||
|
|
b5c513b4b5 | ||
|
|
ee761ff098 | ||
|
|
27c22deb6c | ||
|
|
681a9f7e61 | ||
|
|
8335a2b1ba | ||
|
|
407425ca78 | ||
|
|
6ca505b4cd | ||
|
|
612eae5e21 | ||
|
|
497b5ea1eb | ||
|
|
cd384e0d59 | ||
|
|
8921cac35b | ||
|
|
cc4306492e | ||
|
|
6042783e82 | ||
|
|
b7b3a9f898 | ||
|
|
15643dcb3f | ||
|
|
5f0f2f5378 | ||
|
|
c1b57b59cf | ||
|
|
21d53818f2 | ||
|
|
359d6f1c34 | ||
|
|
584f251e4a | ||
|
|
7d9c2b2ac4 | ||
|
|
fba4d9beff | ||
|
|
0bde5fdab5 | ||
|
|
1beab80c1f | ||
|
|
7b270f9f4a | ||
|
|
03e5342067 | ||
|
|
b1d57426fb | ||
|
|
06e5c52f35 | ||
|
|
64ca839c0b | ||
|
|
80aebda023 | ||
|
|
5dee2281a2 |
+54
-8
@@ -1,17 +1,63 @@
|
|||||||
## 0.48.0.pre2 (2012-06-17)
|
## 0.56.0 (2012-08-19)
|
||||||
|
|
||||||
* 0.48.0.pre2 [David Dollar]
|
* read .profile, not .profile.d [David Dollar]
|
||||||
|
|
||||||
|
## 0.55.0 (2012-08-14)
|
||||||
|
|
||||||
|
* use a forked process to exec a run with environment [David Dollar]
|
||||||
|
|
||||||
|
## 0.54.0 (2012-08-14)
|
||||||
|
|
||||||
|
* use Foreman::Process to extract command running [David Dollar]
|
||||||
|
* changed to check env for bash [brntbeer]
|
||||||
|
|
||||||
|
## 0.53.0 (2012-07-24)
|
||||||
|
|
||||||
|
* put app root in $HOME [David Dollar]
|
||||||
|
|
||||||
|
## 0.52.0 (2012-07-24)
|
||||||
|
|
||||||
|
* wrap command in a runner that sources .profile.d scripts [David Dollar]
|
||||||
|
* fix upstart export specs [David Dollar]
|
||||||
|
* Make upstart export start/stop with network [Daniel Farrell]
|
||||||
|
|
||||||
|
## 0.51.0 (2012-07-11)
|
||||||
|
|
||||||
|
* dont try to colorize windows [David Dollar]
|
||||||
|
|
||||||
|
## 0.50.0 (2012-07-11)
|
||||||
|
|
||||||
|
* handle windows [David Dollar]
|
||||||
|
|
||||||
|
## 0.49.0 (2012-07-11)
|
||||||
|
|
||||||
|
* 1.8 compatibility [David Dollar]
|
||||||
|
* use one pgroup for all of foreman and kill that since ruby 1.8 sucks at pgroups [David Dollar]
|
||||||
|
* better debugging [David Dollar]
|
||||||
|
|
||||||
|
## 0.48.0 (2012-07-10)
|
||||||
|
|
||||||
|
* allow old exporter format to work, but with deprecation warning [David Dollar]
|
||||||
|
* remove debugging code [David Dollar]
|
||||||
|
* Merge pull request #219 from MarkDBlackwell/patch-1 [David Dollar]
|
||||||
|
* Avoid crash by verifying the existence of SIGHUP before accessing it. [Mark D. Blackwell]
|
||||||
* allow color to be forced on [David Dollar]
|
* allow color to be forced on [David Dollar]
|
||||||
* terminate gracefully if stdout goes away [David Dollar]
|
* terminate gracefully if stdout goes away [David Dollar]
|
||||||
* always flush output [David Dollar]
|
* always flush output [David Dollar]
|
||||||
|
* Merge pull request #212 from morgoth/added-version-command [David Dollar]
|
||||||
|
* added command for displaying foreman version [Wojciech Wnętrzak]
|
||||||
|
* Merge pull request #211 from morgoth/fixed-yaml-usage [David Dollar]
|
||||||
|
* fixed using YAML [Wojciech Wnętrzak]
|
||||||
* test on more things, but don't fail [David Dollar]
|
* test on more things, but don't fail [David Dollar]
|
||||||
* changelog [David Dollar]
|
* changelog [David Dollar]
|
||||||
|
* 0.48.0.pre1 [David Dollar]
|
||||||
## 0.48.0.pre1 (2012-06-11)
|
* foreman doesn't work on ruby 1.8, may try to fix later [David Dollar]
|
||||||
|
* use bash [David Dollar]
|
||||||
* Massive refactoring for programmatic control and stability [David Dollar]
|
* massive refactoring for programmatic control and stability [David Dollar]
|
||||||
* Procfile commands with shell interpolations now work again [David Dollar]
|
* Merge pull request #164 from hsume2/master [David Dollar]
|
||||||
* Stop trying to test on Ruby 1.8 [David Dollar]
|
* Only run tmux specs if tmux is installed [Henry Hsu]
|
||||||
|
* Do not assume BUNDLE_GEMFILE [Henry Hsu]
|
||||||
|
* Add support for starting procfile in tmux session [Henry Hsu]
|
||||||
|
|
||||||
## 0.47.0 (2012-06-07)
|
## 0.47.0 (2012-06-07)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
foreman (0.50.0)
|
foreman (0.57.0)
|
||||||
thor (>= 0.13.6)
|
thor (>= 0.13.6)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
|||||||
+12
-3
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
#/ Usage: foreman-runner [-d <dir>] <command> [<args>...]
|
#/ Usage: foreman-runner [-d <dir>] [-p] <command> [<args>...]
|
||||||
#/
|
#/
|
||||||
#/ Run a command with exec, optionally changing directory first
|
#/ Run a command with exec, optionally changing directory first
|
||||||
|
|
||||||
@@ -16,9 +16,12 @@ usage() {
|
|||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts ":hd:" OPT; do
|
read_profile=""
|
||||||
|
|
||||||
|
while getopts ":hd:p" OPT; do
|
||||||
case $OPT in
|
case $OPT in
|
||||||
d) cd "$OPTARG" ;;
|
d) cd "$OPTARG" ;;
|
||||||
|
p) read_profile="1" ;;
|
||||||
h) usage ;;
|
h) usage ;;
|
||||||
\?) error "invalid option: -$OPTARG" ;;
|
\?) error "invalid option: -$OPTARG" ;;
|
||||||
:) error "option -$OPTARG requires an argument" ;;
|
:) error "option -$OPTARG requires an argument" ;;
|
||||||
@@ -29,4 +32,10 @@ shift $((OPTIND-1))
|
|||||||
|
|
||||||
[ -z "$1" ] && usage
|
[ -z "$1" ] && usage
|
||||||
|
|
||||||
|
if [ "$read_profile" == "1" ]; then
|
||||||
|
if [ -f .profile ]; then
|
||||||
|
source .profile
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
export FOO=bar
|
||||||
@@ -6,3 +6,11 @@ bash << "EOF"
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
end script
|
end script
|
||||||
|
|
||||||
|
start on (started network-interface
|
||||||
|
or started network-manager
|
||||||
|
or started networking)
|
||||||
|
|
||||||
|
stop on (stopping network-interface
|
||||||
|
or stopping network-manager
|
||||||
|
or stopping networking)
|
||||||
|
|||||||
Vendored
+16
@@ -0,0 +1,16 @@
|
|||||||
|
file pkg("foreman-#{version}-x86-mswin32.gem") => distribution_files do |t|
|
||||||
|
Bundler.with_clean_env do
|
||||||
|
sh "env PLATFORM=mswin32 gem build foreman.gemspec"
|
||||||
|
end
|
||||||
|
sh "mv foreman-#{version}-x86-mswin32.gem #{t.name}"
|
||||||
|
end
|
||||||
|
|
||||||
|
task "mswin32:build" => pkg("foreman-#{version}-x86-mswin32.gem")
|
||||||
|
|
||||||
|
task "mswin32:clean" do
|
||||||
|
clean pkg("foreman-#{version}-x86-mswin32.gem")
|
||||||
|
end
|
||||||
|
|
||||||
|
task "mswin32:release" => "mswin32:build" do |t|
|
||||||
|
sh "gem push #{pkg("foreman-#{version}-x86-mswin32.gem")} || echo 'error'"
|
||||||
|
end
|
||||||
+10
-6
@@ -75,13 +75,17 @@ class Foreman::CLI < Thor
|
|||||||
|
|
||||||
def run(*args)
|
def run(*args)
|
||||||
load_environment!
|
load_environment!
|
||||||
begin
|
pid = fork do
|
||||||
exec engine.env, args.shelljoin
|
begin
|
||||||
rescue Errno::EACCES
|
engine.env.each { |k,v| ENV[k] = v }
|
||||||
error "not executable: #{args.first}"
|
exec args.shelljoin
|
||||||
rescue Errno::ENOENT
|
rescue Errno::EACCES
|
||||||
error "command not found: #{args.first}"
|
error "not executable: #{args.first}"
|
||||||
|
rescue Errno::ENOENT
|
||||||
|
error "command not found: #{args.first}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Process.wait(pid)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "version", "Display Foreman gem version"
|
desc "version", "Display Foreman gem version"
|
||||||
|
|||||||
@@ -256,7 +256,10 @@ private
|
|||||||
1.upto(formation[@names[process]]) do |n|
|
1.upto(formation[@names[process]]) do |n|
|
||||||
reader, writer = create_pipe
|
reader, writer = create_pipe
|
||||||
begin
|
begin
|
||||||
pid = process.run(:output => writer, :env => { "PORT" => port_for(process, n).to_s })
|
pid = process.run(:output => writer, :env => {
|
||||||
|
"HOME" => process.cwd,
|
||||||
|
"PORT" => port_for(process, n).to_s
|
||||||
|
})
|
||||||
writer.puts "started with pid #{pid}"
|
writer.puts "started with pid #{pid}"
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
writer.puts "unknown command: #{process.command}"
|
writer.puts "unknown command: #{process.command}"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class Foreman::Engine::CLI < Foreman::Engine
|
|||||||
|
|
||||||
def color?
|
def color?
|
||||||
return true if @@color_force
|
return true if @@color_force
|
||||||
return true if Foreman.windows?
|
return false if Foreman.windows?
|
||||||
return false unless self.respond_to?(:isatty)
|
return false unless self.respond_to?(:isatty)
|
||||||
self.isatty && ENV["TERM"]
|
self.isatty && ENV["TERM"]
|
||||||
end
|
end
|
||||||
@@ -49,9 +49,8 @@ class Foreman::Engine::CLI < Foreman::Engine
|
|||||||
|
|
||||||
def startup
|
def startup
|
||||||
@colors = map_colors
|
@colors = map_colors
|
||||||
proctitle "foreman: master"
|
proctitle "foreman: master" unless Foreman.windows?
|
||||||
require "win32console" if Foreman.windows?
|
Color.enable($stdout, options[:color])
|
||||||
Color.enable($stdout, options[:color]) unless $stdout.respond_to?(:color?)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def output(name, data)
|
def output(name, data)
|
||||||
|
|||||||
+16
-17
@@ -43,23 +43,20 @@ class Foreman::Process
|
|||||||
Process.spawn env, expanded_command, :out => output, :err => output
|
Process.spawn env, expanded_command, :out => output, :err => output
|
||||||
end
|
end
|
||||||
elsif Foreman.jruby?
|
elsif Foreman.jruby?
|
||||||
Dir.chdir(cwd) do
|
require "posix/spawn"
|
||||||
require "posix/spawn"
|
wrapped_command = "#{Foreman.runner} -d '#{cwd}' -p -- #{command}"
|
||||||
POSIX::Spawn.spawn env, command, :out => output, :err => output
|
POSIX::Spawn.spawn env, wrapped_command, :out => output, :err => output
|
||||||
end
|
|
||||||
elsif Foreman.ruby_18?
|
elsif Foreman.ruby_18?
|
||||||
Dir.chdir(cwd) do
|
fork do
|
||||||
fork do
|
$stdout.reopen output
|
||||||
$stdout.reopen output
|
$stderr.reopen output
|
||||||
$stderr.reopen output
|
env.each { |k,v| ENV[k] = v }
|
||||||
env.each { |k,v| ENV[k] = v }
|
wrapped_command = "#{Foreman.runner} -d '#{cwd}' -p -- #{command}"
|
||||||
exec command
|
exec wrapped_command
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Dir.chdir(cwd) do
|
wrapped_command = "#{Foreman.runner} -d '#{cwd}' -p -- #{command}"
|
||||||
Process.spawn env, command, :out => output, :err => output
|
Process.spawn env, wrapped_command, :out => output, :err => output
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -93,10 +90,12 @@ class Foreman::Process
|
|||||||
!alive?
|
!alive?
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
# Returns the working directory for this +Process+
|
||||||
|
#
|
||||||
|
# @returns [String]
|
||||||
|
#
|
||||||
def cwd
|
def cwd
|
||||||
@options[:cwd] || "."
|
File.expand_path(@options[:cwd] || ".")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module Foreman
|
module Foreman
|
||||||
|
|
||||||
VERSION = "0.50.0"
|
VERSION = "0.57.0"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "FOREMAN" "1" "June 2012" "Foreman 0.49.0" "Foreman Manual"
|
.TH "FOREMAN" "1" "July 2012" "Foreman 0.51.0" "Foreman Manual"
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBforeman\fR \- manage Procfile\-based applications
|
\fBforeman\fR \- manage Procfile\-based applications
|
||||||
|
|||||||
@@ -6,3 +6,11 @@ bash << "EOF"
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
end script
|
end script
|
||||||
|
|
||||||
|
start on (started network-interface
|
||||||
|
or started network-manager
|
||||||
|
or started networking)
|
||||||
|
|
||||||
|
stop on (stopping network-interface
|
||||||
|
or stopping network-manager
|
||||||
|
or stopping networking)
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ def latest_release
|
|||||||
end
|
end
|
||||||
|
|
||||||
def newer_release
|
def newer_release
|
||||||
tags = %x{ git tag --contains v#{latest_release} }.split("\n").sort_by do |tag|
|
tags = %x{ git tag --contains v#{latest_release} | grep -v pre }.split("\n").sort_by do |tag|
|
||||||
Gem::Version.new(tag[1..-1])
|
Gem::Version.new(tag[1..-1])
|
||||||
end
|
end
|
||||||
tags[1]
|
tags[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user