Merge branch 'hotfix/0.7.1.1'
This commit is contained in:
commit
2c9fec91da
8 changed files with 82 additions and 19 deletions
|
|
@ -24,15 +24,13 @@ branches:
|
||||||
- 'develop'
|
- 'develop'
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- gem install bundler
|
- script/ci/prepare.sh
|
||||||
- mkdir travis-phantomjs
|
- mkdir travis-phantomjs
|
||||||
- wget http://cifiles.diasporafoundation.org/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
- wget http://cifiles.diasporafoundation.org/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||||
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
|
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
|
||||||
- export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
|
- export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
|
||||||
|
|
||||||
bundler_args: "--deployment --without development --with mysql postgresql --jobs 3 --retry 3"
|
script: "bin/rake --trace ci:travis:${BUILD_TYPE}"
|
||||||
|
|
||||||
script: "./script/ci/build.sh"
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
irc:
|
irc:
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
# 0.7.1.1
|
||||||
|
|
||||||
|
Fixes an issue with installing and running diaspora\* with today released bundler v1.16.0.
|
||||||
|
|
||||||
# 0.7.1.0
|
# 0.7.1.0
|
||||||
|
|
||||||
## Ensure account deletions are run
|
## Ensure account deletions are run
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@ require_relative 'boot'
|
||||||
|
|
||||||
require 'rails/all'
|
require 'rails/all'
|
||||||
|
|
||||||
|
require_relative "bundler_helper"
|
||||||
|
|
||||||
# Require the gems listed in Gemfile, including any gems
|
# Require the gems listed in Gemfile, including any gems
|
||||||
# you've limited to :test, :development, or :production.
|
# you've limited to :test, :development, or :production.
|
||||||
Bundler.require(*Rails.groups(*Bundler.settings.with))
|
Bundler.require(*Rails.groups(BundlerHelper.database))
|
||||||
|
|
||||||
# Do not dump the limit of boolean fields on MySQL,
|
# Do not dump the limit of boolean fields on MySQL,
|
||||||
# since that generates a db/schema.rb that's incompatible
|
# since that generates a db/schema.rb that's incompatible
|
||||||
|
|
|
||||||
26
config/bundler_helper.rb
Normal file
26
config/bundler_helper.rb
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "yaml"
|
||||||
|
|
||||||
|
module BundlerHelper
|
||||||
|
def self.rails_env
|
||||||
|
@rails_env ||= ENV["RAILS_ENV"] ||
|
||||||
|
parse_value_from_file("diaspora.yml", "configuration", "server", "rails_environment") ||
|
||||||
|
parse_value_from_file("defaults.yml", "defaults", "server", "rails_environment")
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.database
|
||||||
|
@adapter ||= parse_value_from_file("database.yml", rails_env, "adapter")
|
||||||
|
|
||||||
|
raise "No database adapter found, please fix your config/database.yml!" unless @adapter
|
||||||
|
|
||||||
|
@adapter.sub("mysql2", "mysql")
|
||||||
|
end
|
||||||
|
|
||||||
|
private_class_method def self.parse_value_from_file(file, *keys)
|
||||||
|
path = File.join(__dir__, file)
|
||||||
|
return YAML.load_file(path).dig(*keys) if File.file?(path)
|
||||||
|
|
||||||
|
puts "Configuration file #{path} not found, ensure it's present" # rubocop:disable Rails/Output
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
version:
|
version:
|
||||||
number: "0.7.1.0" # Do not touch unless doing a release, do not backport the version number that's in master
|
number: "0.7.1.1" # Do not touch unless doing a release, do not backport the version number that's in master
|
||||||
heroku: false
|
heroku: false
|
||||||
environment:
|
environment:
|
||||||
url: "http://localhost:3000/"
|
url: "http://localhost:3000/"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
|
|
||||||
# Create a database.yml for the right database
|
|
||||||
echo "Setting up database.yml for $DB"
|
|
||||||
cp config/database.yml.example config/database.yml
|
|
||||||
if [ "$DB" = "mysql" ]; then
|
|
||||||
sed -i 's/*common/*mysql/' config/database.yml
|
|
||||||
fi
|
|
||||||
|
|
||||||
command="bundle exec rake --trace ci:travis:${BUILD_TYPE}"
|
|
||||||
|
|
||||||
exec xvfb-run --auto-servernum --server-num=1 --server-args="-screen 0 1280x1024x8" $command
|
|
||||||
11
script/ci/prepare.sh
Executable file
11
script/ci/prepare.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Create a database.yml for the right database
|
||||||
|
echo "Setting up database.yml for ${DB}"
|
||||||
|
cp config/database.yml.example config/database.yml
|
||||||
|
if [ "${DB}" = "mysql" ]; then
|
||||||
|
sed -i 's/*common/*mysql/' config/database.yml
|
||||||
|
fi
|
||||||
|
|
||||||
|
gem install bundler
|
||||||
|
script/configure_bundler
|
||||||
35
script/configure_bundler
Executable file
35
script/configure_bundler
Executable file
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require_relative "../config/bundler_helper"
|
||||||
|
|
||||||
|
rails_env = BundlerHelper.rails_env
|
||||||
|
database = BundlerHelper.database
|
||||||
|
|
||||||
|
puts "Configuring Bundler for #{rails_env} environment and #{database} database."
|
||||||
|
|
||||||
|
def config(option)
|
||||||
|
puts "$ bin/bundle config --local #{option}"
|
||||||
|
system("#{File.join(__dir__, '../bin/bundle')} config --local #{option}")
|
||||||
|
end
|
||||||
|
|
||||||
|
config("jobs #{`nproc`}")
|
||||||
|
config("with #{database}")
|
||||||
|
|
||||||
|
if rails_env == "production"
|
||||||
|
config("without test:development")
|
||||||
|
elsif rails_env == "test"
|
||||||
|
config("without development")
|
||||||
|
end
|
||||||
|
|
||||||
|
if rails_env != "development"
|
||||||
|
config("path vendor/bundle")
|
||||||
|
config("frozen 1")
|
||||||
|
config("disable_shared_gems true")
|
||||||
|
end
|
||||||
|
|
||||||
|
if `gcc -dumpversion`.split(".").first.to_i >= 5
|
||||||
|
config("build.sigar \"--with-cppflags='-fgnu89-inline'\"")
|
||||||
|
end
|
||||||
|
|
||||||
|
puts "Bundler configured! Please run 'bin/bundle install' now."
|
||||||
Loading…
Reference in a new issue