Merge pull request #2186 from pkgr/pkgr

Automatically generate a debian package
This commit is contained in:
Neil Lalonde 2014-03-26 15:14:31 -04:00
commit 79caebc00e
3 changed files with 16 additions and 6 deletions

1
.pkgr.yml Normal file
View File

@ -0,0 +1 @@
before_precompile: ./packaging/debian/setup.sh

View File

@ -43,7 +43,7 @@ module JsLocaleHelper
end end
def self.moment_format_function(name) def self.moment_format_function(name)
format = I18n.t("dates." << name) format = I18n.t("dates.#{name}")
result = "moment.fn.#{name.camelize(:lower)} = function(){ return this.format('#{format}'); };\n" result = "moment.fn.#{name.camelize(:lower)} = function(){ return this.format('#{format}'); };\n"
end end

View File

@ -1,8 +1,17 @@
#!/bin/sh #!/bin/sh
# This script installs the required example config files before buildpack compilation. # This script sets up the required config files before buildpack compilation.
#
# It also launches a postgresql server and a redis server, otherwise some rake
# tasks can't be completed.
set -ex set -e
cp config/database.yml.production-sample config/database.yml # Not everyone chooses to run discourse behind Apache or Nginx.
cp config/redis.yml.sample config/redis.yml cat >> config/environments/production.rb <<EOF
cp config/environments/production.rb.sample config/environments/production.rb Discourse::Application.configure do
config.serve_static_assets = true
end
EOF
sudo service postgresql start
sudo service redis-server start