Commit a43ac630967677eb7d89c1b90a49ab5d59a874ea
1 parent
083440f4
Exists in
master
and in
29 other branches
ActionItem862: testing further the 0.13 migration
Showing
3 changed files
with
29 additions
and
7 deletions
Show diff stats
script/apply-template
@@ -17,11 +17,16 @@ when 'active-enterprise' | @@ -17,11 +17,16 @@ when 'active-enterprise' | ||
17 | when 'community' | 17 | when 'community' |
18 | communities = Community.find(:all) - [Community['espaco'], Community['anarquismo']] | 18 | communities = Community.find(:all) - [Community['espaco'], Community['anarquismo']] |
19 | communities.each { |community| | 19 | communities.each { |community| |
20 | + puts 'c: ' + community.identifier | ||
20 | community.apply_template(env.community_template) | 21 | community.apply_template(env.community_template) |
21 | - blog = community.blog | ||
22 | - community.articles.select{|i| !i.blog? or i != blog.feed}.each{ |article| | ||
23 | - article.parent = blog | ||
24 | - article.save! | 22 | + community.reload |
23 | + puts 'template applied' | ||
24 | + community.articles.each { |article| | ||
25 | + puts 'including ' + article.path + ' in the blog' | ||
26 | + if !article.blog? && !article.is_a?(RssFeed) | ||
27 | + article.parent_id = community.blog.id | ||
28 | + article.save! | ||
29 | + end | ||
25 | } | 30 | } |
26 | } | 31 | } |
27 | end | 32 | end |
script/release-v0.13.0-ecosol
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | -export RAILS_ENV=production | 3 | +if [ -x $RAILS_ENV ]; then |
4 | + export RAILS_ENV=production | ||
5 | +fi | ||
6 | + | ||
7 | +echo "Rails environment: $RAILS_ENV" | ||
4 | 8 | ||
5 | echo 'Creating Big images...' | 9 | echo 'Creating Big images...' |
6 | script/generate-profile-big-images | 10 | script/generate-profile-big-images |
@@ -73,7 +77,7 @@ script/runner 'env = Environment.default; | @@ -73,7 +77,7 @@ script/runner 'env = Environment.default; | ||
73 | echo 'ATENCAO: Copie o tema (via scp) empreendimento-solidario para public/designs/themes/' | 77 | echo 'ATENCAO: Copie o tema (via scp) empreendimento-solidario para public/designs/themes/' |
74 | echo ' Nao esqueca de copiar o footer.rhtml do tema default' | 78 | echo ' Nao esqueca de copiar o footer.rhtml do tema default' |
75 | echo ' (e pressione ENTER para continuar)' | 79 | echo ' (e pressione ENTER para continuar)' |
76 | -read | 80 | +read INPUT |
77 | 81 | ||
78 | echo 'Applying empreendimento-solidario theme...' | 82 | echo 'Applying empreendimento-solidario theme...' |
79 | script/runner 'c = Enterprise.connection; | 83 | script/runner 'c = Enterprise.connection; |
@@ -120,7 +124,7 @@ echo 'Schedule task-nitifier script...' | @@ -120,7 +124,7 @@ echo 'Schedule task-nitifier script...' | ||
120 | echo 'ATENCAO: Agende o script task-notifier no crontab para executar mensalmente' | 124 | echo 'ATENCAO: Agende o script task-notifier no crontab para executar mensalmente' |
121 | echo ' Não esqueça de setar no environment.rb o ambiente para production' | 125 | echo ' Não esqueça de setar no environment.rb o ambiente para production' |
122 | echo ' (pressione ENTER para continuar)' | 126 | echo ' (pressione ENTER para continuar)' |
123 | -read | 127 | +read INPUT |
124 | 128 | ||
125 | echo 'Disabling CMS...' | 129 | echo 'Disabling CMS...' |
126 | script/runner 'env = Environment.default | 130 | script/runner 'env = Environment.default |
@@ -0,0 +1,13 @@ | @@ -0,0 +1,13 @@ | ||
1 | +#!/bin/sh | ||
2 | + | ||
3 | +rm -f db/*.db | ||
4 | +find public/images/ -name \*big\* -delete | ||
5 | +rake db:schema:load | ||
6 | +rake db:populate | ||
7 | +ruby script/anhetegua | ||
8 | + | ||
9 | +./script/runner ' | ||
10 | + Enterprise.create!(:name => "Desabilitada", :identifier => "desabilitada", :enabled => false, :environment => Environment.default) | ||
11 | +' | ||
12 | + | ||
13 | +RAILS_ENV=development script/release-v0.13.0-ecosol |