Commit 73bba38f44638326ef18f74a96001772ba90b17d
Exists in
theme-brasil-digital-from-staging
and in
4 other branches
Merge branch 'master' into staging_rails4
Showing
5 changed files
with
42 additions
and
30 deletions
Show diff stats
.gitlab-ci.yml
1 | +image: noosfero/ci | ||
2 | + | ||
1 | before_script: | 3 | before_script: |
2 | - - mkdir -p tmp/{pids,cache} log | ||
3 | - - bundle check || bundle install | ||
4 | -# workaround for plugins with Gemfile | ||
5 | - - perl -pi -e 's/--local //' script/noosfero-plugins | ||
6 | - - script/noosfero-plugins disableall | ||
7 | - - bundle exec rake makemo &>/dev/null | ||
8 | -# database | ||
9 | - - cp config/database.yml.gitlab-ci config/database.yml | ||
10 | - - createdb gitlab_ci_test || true | ||
11 | - - bundle exec rake db:schema:load &>/dev/null | ||
12 | - - bundle exec rake db:migrate &>/dev/null | 4 | + - mkdir -p locale # makes quick-start skip compiling translations |
5 | + - ./script/silent-quick-start | ||
13 | 6 | ||
14 | units: | 7 | units: |
15 | script: bundle exec rake test:units | 8 | script: bundle exec rake test:units |
@@ -0,0 +1,10 @@ | @@ -0,0 +1,10 @@ | ||
1 | +FROM debian:jessie | ||
2 | +MAINTAINER Noosfero Development Team <noosfero-dev@listas.softwarelivre.org> | ||
3 | + | ||
4 | +RUN apt-get update && apt-get install -y sudo git | ||
5 | +RUN git clone --depth 1 https://gitlab.com/noosfero/noosfero.git /var/tmp/noosfero | ||
6 | +RUN cd /var/tmp/noosfero && ./script/set-apt-proxy | ||
7 | +RUN cd /var/tmp/noosfero && ./script/quick-start | ||
8 | +RUN rm -rf /var/tmp/noosfero | ||
9 | +RUN apt-get clean | ||
10 | +RUN rm -f /etc/apt/apt.conf.d/01proxy |
lib/noosfero/version.rb
@@ -5,14 +5,16 @@ end | @@ -5,14 +5,16 @@ end | ||
5 | 5 | ||
6 | root = File.expand_path(File.dirname(__FILE__) + '/../..') | 6 | root = File.expand_path(File.dirname(__FILE__) + '/../..') |
7 | if File.exist?(File.join(root, '.git')) && system('which git >/dev/null') | 7 | if File.exist?(File.join(root, '.git')) && system('which git >/dev/null') |
8 | - git_version = Dir.chdir(root) { `git describe --tags`.to_s.strip.sub('-rc', '~rc') } | ||
9 | - version_sort = IO.popen(['sort', '--version-sort'], 'w+') | ||
10 | - version_sort.puts(Noosfero::VERSION) | ||
11 | - version_sort.puts(git_version) | ||
12 | - version_sort.close_write | ||
13 | - new_version = version_sort.readlines.last.strip | ||
14 | - if new_version != Noosfero::VERSION | ||
15 | - Noosfero::VERSION.clear << git_version | 8 | + git_version = Dir.chdir(root) { `git describe --tags 2>/dev/null`.to_s.strip.sub('-rc', '~rc') } |
9 | + if git_version != '' | ||
10 | + version_sort = IO.popen(['sort', '--version-sort'], 'w+') | ||
11 | + version_sort.puts(Noosfero::VERSION) | ||
12 | + version_sort.puts(git_version) | ||
13 | + version_sort.close_write | ||
14 | + new_version = version_sort.readlines.last.strip | ||
15 | + if new_version != Noosfero::VERSION | ||
16 | + Noosfero::VERSION.clear << git_version | ||
17 | + end | ||
18 | + version_sort.close | ||
16 | end | 19 | end |
17 | - version_sort.close | ||
18 | end | 20 | end |
@@ -0,0 +1,15 @@ | @@ -0,0 +1,15 @@ | ||
1 | +#!/bin/sh | ||
2 | + | ||
3 | +set -e | ||
4 | + | ||
5 | +sudo apt-get install -qy netcat-traditional | ||
6 | + | ||
7 | +# apt-cacher-ng running on the host | ||
8 | +# 10.0.2.2 = host ip on virtualbox/qemu | ||
9 | +# 192.168..122.1 = host ip on default libvirt bridge | ||
10 | +# 172.17.42.1 = host ip on default docker bridge | ||
11 | +for ip in 10.0.2.2 192.168.122.1 172.17.42.1; do | ||
12 | + if nc -z -w 1 $ip 3142; then | ||
13 | + echo "Acquire::http::Proxy \"http://$ip:3142\";" | sudo tee /etc/apt/apt.conf.d/01proxy | ||
14 | + fi | ||
15 | +done |
script/vagrant
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | set -e | 3 | set -e |
4 | -sudo apt-get install netcat-traditional | ||
5 | 4 | ||
6 | -# apt-cacher-ng running on the host | ||
7 | -# 10.0.2.2 = host ip on virtualbox/qemu | ||
8 | -# 192.168..122.1 = host ip on default libvirt bridge | ||
9 | -for ip in 10.0.2.2 192.168.122.1; do | ||
10 | - if nc -z -w 1 $ip 3142; then | ||
11 | - echo "Acquire::http::Proxy \"http://$ip:3142\";" | sudo tee /etc/apt/apt.conf.d/01proxy | ||
12 | - fi | ||
13 | -done | 5 | +cd /vagrant |
6 | +./script/set-apt-proxy | ||
14 | 7 | ||
15 | sudo DEBIAN_FRONTEND=noninteractive apt-get install -qy postfix | 8 | sudo DEBIAN_FRONTEND=noninteractive apt-get install -qy postfix |
16 | sudo postconf virtual_alias_maps=hash:/etc/postfix/virtual | 9 | sudo postconf virtual_alias_maps=hash:/etc/postfix/virtual |
@@ -20,5 +13,4 @@ EOF | @@ -20,5 +13,4 @@ EOF | ||
20 | sudo postmap /etc/postfix/virtual | 13 | sudo postmap /etc/postfix/virtual |
21 | sudo service postfix reload | 14 | sudo service postfix reload |
22 | 15 | ||
23 | -cd /vagrant | ||
24 | ./script/quick-start | 16 | ./script/quick-start |