--- /dev/null
+#!/usr/bin/ruby\r
+=begin\r
+Copyright 2008 Grégory Burri\r
+\r
+This file is part of Euphorik.\r
+\r
+Euphorik is free software: you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published by\r
+the Free Software Foundation, either version 3 of the License, or\r
+(at your option) any later version.\r
+\r
+Euphorik is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with Euphorik. If not, see <http://www.gnu.org/licenses/>.\r
+=end\r
+\r
+# TODO : utilisation de tools.rb
\ No newline at end of file
-#TODO
\ No newline at end of file
+#!/usr/bin/ruby\r
+=begin\r
+Copyright 2008 Grégory Burri\r
+\r
+This file is part of Euphorik.\r
+\r
+Euphorik is free software: you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published by\r
+the Free Software Foundation, either version 3 of the License, or\r
+(at your option) any later version.\r
+\r
+Euphorik is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with Euphorik. If not, see <http://www.gnu.org/licenses/>.\r
+=end\r
+\r
+# TODO : utilisation de tools.rb
\ No newline at end of file
along with Euphorik. If not, see <http://www.gnu.org/licenses/>.
=end
-$rep_remote = '/var/www/euphorik'
-$host = 'euphorik.ch'
-$opt_rsync = ''\r
-\r
-\r
-#TODO \r
-# - mettre à jour les numéros de versions en appelant le script "cope_num_version.rb"\r
-# - création de unit tests (voir eunit) et validation avant la mise en prod
-
-def creer_remote_rep(rep)
- begin
- `ssh #{$host} "mkdir #{$rep_remote}/#{rep}"`
- rescue
- end
-end
-
-
-# Compilation de la partie serveur
-Dir.chdir('../modules')
-puts `make`
-if $?.exitstatus != 0
- puts "Echec de compilation de la partie serveuse"
- exit 1
-end
-Dir.chdir('..')
-
-# création du repertoire BD
-creer_remote_rep('BD')
-`ssh #{$host} "chmod g+w #{$rep_remote}/BD"`
-
-# copie de la partie statique : css, images, html, etc..
-print `rsync #{$opt_rsync} index.yaws #{$host}:#{$rep_remote}`
-print `rsync #{$opt_rsync} favicon.ico #{$host}:#{$rep_remote}`
-print `rsync #{$opt_rsync} -r css #{$host}:#{$rep_remote}`
-print `rsync #{$opt_rsync} -r pages #{$host}:#{$rep_remote}`
-print `rsync #{$opt_rsync} -r --exclude 'autres' img #{$host}:#{$rep_remote}`
-
-# copie des js avec minification
-rep_js = 'js'
-creer_remote_rep(rep_js)
-Dir.entries(rep_js).each{|fichier|
- if fichier[0..0] != "." and fichier != "debug.js"
- puts "Minimisation et copie de #{fichier}"
- print `tools/jsmin.rb < #{rep_js}/#{fichier} | ssh #{$host} "cat > #{$rep_remote}/#{rep_js}/#{fichier}"`
- end
-}
-
-# copie des modules erlang
-creer_remote_rep('modules')
-`rsync #{$opt_rsync} -r --exclude 'euphorik_test.beam' modules/ebin #{$host}:#{$rep_remote}/modules`
-`rsync #{$opt_rsync} -r modules/include #{$host}:#{$rep_remote}/modules`
-
-# attribution des droits
-`ssh #{$host} "chmod -R g+rx #{$rep_remote}"`
-
-# execution du script de mise à jour
-print `cat tools/mise_en_prod.erl | ssh #{$host} "cat > /tmp/mise_en_prod.erl"`
-print `ssh #{$host} "chmod u+x /tmp/mise_en_prod.erl; /tmp/mise_en_prod.erl; rm /tmp/mise_en_prod.erl"`
+# TODO : utilisation de tools.rb
\ No newline at end of file