X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=tools%2Ftools.rb;h=644c82564f9ad5f826b29d8c074c6f997424ba45;hp=fe7eb9db5539373365930b8c346b249c1f28861e;hb=4dfbbcf0f54cb3eb70856ea404d9ecef6aec5e26;hpb=d1e6f8e7c86f1ee75e854266463541ffedb916c9 diff --git a/tools/tools.rb b/tools/tools.rb index fe7eb9d..644c825 100644 --- a/tools/tools.rb +++ b/tools/tools.rb @@ -20,14 +20,19 @@ along with Euphorik. If not, see . #TODO : # - mettre à jour les numéros de versions en appelant le script "cope_num_version.rb" -# - création de unit tests (voir eunit) et validation avant la mise en prod +# - création de unit tests (voir eunit) et validation avant la mise en prod + +# Utilisation : +# tools.rb +# commandes : +# class MiseEnProd @@rep_remote = '/var/www/euphorik' @@host = 'euphorik.ch' @@opt_rsync = '' - def initialize + def initialize end def creer_remote_rep(rep) @@ -55,12 +60,19 @@ class MiseEnProd end # css, images, html, etc.. - def copier_partie_statique - 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}` + def copier_partie_statique + copier_fichier_html("index.yaws") + + ####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}` + end + + # Copie un fichier html, enlève les balises qui ont comme attribut : prod="delete" + def copier_fichier_htm(fichier) + end # contrôle des fichiers js à l'aide de jslint