aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/generate_pot.sh5
-rwxr-xr-xscript/rails-post-deploy27
-rwxr-xr-xscript/spec-all-pairs17
3 files changed, 18 insertions, 31 deletions
diff --git a/script/generate_pot.sh b/script/generate_pot.sh
index 1ca361d08..0c5dfda36 100755
--- a/script/generate_pot.sh
+++ b/script/generate_pot.sh
@@ -3,7 +3,6 @@
cd `dirname $0`
rake gettext:store_model_attributes
-rake gettext:find
-git checkout ../locale/*/app.po
+rake gettext:findpot
-echo "Now commit the new app.pot and push. See TRANSLATE.md for more info" \ No newline at end of file
+echo "Now commit the new app.pot and push. See TRANSLATE.md for next steps" \ No newline at end of file
diff --git a/script/rails-post-deploy b/script/rails-post-deploy
index df9f67528..263d5d926 100755
--- a/script/rails-post-deploy
+++ b/script/rails-post-deploy
@@ -55,33 +55,6 @@ cd log
touch development.log fastcgi.crash.log production.log test.log
cd ..
-# Force appropriate environment (via a hack in config/boot.rb which needs
-# applying to your rails app, see foi/config/boot.rb)
-if [ ! -e "config/rails_env.rb" ]
-then
- cat <<END
-
-*****************************************************************
-WARNING: About to make config/rails_env.rb which, via special
-code in config/boot.rb, forces the Rails environment to be a
-particular one - this is used for the mySociety deployment
-system. You don't want it for local development, because it will
-not work in a confusing way you try and use two environments
-(e.g. development and test) in the same working directory.
-*****************************************************************
-
-END
-fi
-if [ "$OPTION_STAGING_SITE" = "0" ]
-then
- echo "ENV['RAILS_ENV'] = 'production'" > config/rails_env.rb
-elif [[ "$OPTION_DOMAIN" == *"test"* ]]
-then
- echo "ENV['RAILS_ENV'] = 'test'" > config/rails_env.rb
-else
- echo "ENV['RAILS_ENV'] = 'development'" > config/rails_env.rb
-fi
-
if [ -n "$OPTION_THEME_URL" ]
then
script/plugin install --force $OPTION_THEME_URL
diff --git a/script/spec-all-pairs b/script/spec-all-pairs
index e8fa77be9..5b6439a4e 100755
--- a/script/spec-all-pairs
+++ b/script/spec-all-pairs
@@ -3,13 +3,21 @@
# Try all ordered pairs of spec files,
# to winkle out order-dependent failures.
+log_file=/dev/null
+
test_pair () {
rake db:test:prepare > /dev/null 2>&1
- if script/spec "$1" "$2" > /dev/null 2>&1
+ output=$(script/spec "$1" "$2" 2>&1)
+ if [ $? -eq 0 ]
then
echo "OK: $1 $2"
return 0
else
+ echo >> "$log_file" "FAILED: $1 $2"
+ echo >> "$log_file" "======================================="
+ echo >> "$log_file" "$output"
+ echo >> "$log_file"
+
echo "FAILED: $1 $2"
return 1
fi
@@ -57,6 +65,13 @@ pairs_from_stdin() {
return $?
}
+if [ "$1" = --log ]
+then
+ shift
+ log_file=$1
+ shift
+ cp /dev/null "$log_file"
+fi
if [ "$1" = "-" ]
then
pairs_from_stdin