2019-08-09 14:28:24 +01:00
DESTDIR = /srv/www/yavscpre
PRODDESTDIR = /srv/www/yavsc
2017-10-20 16:29:22 +02:00
HOSTING = localhost
2019-05-22 17:27:44 +01:00
ASPNET_LOG_LEVEL = debug
2019-01-01 16:28:47 +00:00
SOURCE_DIR = $( HOME) /workspace/yavsc
MAKEFILE_DIR = $( SOURCE_DIR) /scripts/build/make
2019-09-27 06:59:20 +01:00
BASERESX = Resources/Yavsc.Models.IT.Fixing.Resources.resx \
Resources/Yavsc.ViewComponents.CommentViewComponent.resx \
Resources/Yavsc.ViewModels.FrontOffice.PerformerProfileViewModel.resx \
Resources/Yavsc.ViewModels.EnrolerViewModel.resx \
2019-06-21 09:20:13 +01:00
Resources/Yavsc.YavscLocalisation.resx
2019-06-19 00:16:17 +01:00
BASERESXGEN = $( BASERESX:.resx= .Designer.cs)
2019-08-20 16:49:38 +01:00
MCS_OPTIONS = --debug
MONO_OPTIONS = --debug
2019-06-19 00:16:17 +01:00
2019-01-01 16:28:47 +00:00
i n c l u d e $( MAKEFILE_DIR ) / v e r s i o n i n g . m k
i n c l u d e $( MAKEFILE_DIR ) / d n x . m k
2018-05-04 10:45:45 +02:00
2019-05-29 21:37:54 +01:00
MINJS = wwwroot/js/bootstrap.min.js wwwroot/js/input-lib.min.js wwwroot/js/jquery.signalR-2.2.1.min.js wwwroot/js/quill.min.js wwwroot/js/chat.min.js wwwroot/js/jquery-2.2.4.min.js wwwroot/js/jquery-ui.min.js wwwroot/js/showdown.min.js wwwroot/js/comment.min.js wwwroot/js/jquery-3.2.1.min.js wwwroot/js/md-helpers.min.js wwwroot/js/site.min.js wwwroot/js/dropzone.min.js wwwroot/js/jquery-migrate-3.0.0.min.js wwwroot/js/parallax.min.js wwwroot/js/str.min.js wwwroot/js/google-geoloc.min.js wwwroot/js/jquery.min.js wwwroot/js/paypalbutton.min.js wwwroot/js/to-markdown.min.js
MINCSS = wwwroot/css/coiffure.min.css wwwroot/css/dev.min.css wwwroot/css/freespeech.min.css wwwroot/css/yavsc.min.css wwwroot/css/default.min.css wwwroot/css/font-awesome.min.css wwwroot/css/lua.min.css wwwroot/css/yavscpre.min.css wwwroot/css/clear/site.min.css wwwroot/css/main/bootstrap.min.css wwwroot/css/main/jquery-ui.min.css wwwroot/css/main/site.min.css wwwroot/css/dark/site.min.css wwwroot/css/main/dropzone.min.css wwwroot/css/main/quill.snow.min.css
2018-05-04 10:45:45 +02:00
web : project .lock .json
2019-08-26 15:06:57 +01:00
MCS_OPTIONS = $( MCS_OPTIONS) MONO_OPTIONS = $( MONO_OPTIONS) ASPNET_LOG_LEVEL = $( ASPNET_LOG_LEVEL) ASPNET_ENV = $( ASPNET_ENV) dnx web --configuration= $( CONFIGURATION) | tee web.log
2017-06-08 12:04:37 +02:00
2019-11-02 15:58:10 +00:00
nweb :
MONO_PATH = $( MONO_PATH) :~/.dnx/runtimes/dnx-mono.1.0.0-rc1-update2/bin ~/.dnx/runtimes/dnx-mono.1.0.0-rc1-update2/bin/ndnx web
2019-07-21 17:35:41 +02:00
showConfig :
@echo HOSTING: $( USER) @$( HOSTING)
@echo ENV: $( ASPNET_ENV)
@echo CONFIGURATION: $( CONFIGURATION)
@echo DESTDIR: $( DESTDIR)
@echo PRODDESTDIR: $( PRODDESTDIR)
2017-06-08 12:04:37 +02:00
status :
i f e q ( $( git_status ) , 0 )
@echo Nothing to be done .
e l s e
2017-06-27 04:40:23 +02:00
@echo There are pending changes:
2017-06-08 12:04:37 +02:00
@git status
e n d i f
2018-07-12 18:17:59 +02:00
publish :
ASPNET_ENV = $( ASPNET_ENV) dnu publish
deploy-pkg : publish
2018-05-03 15:40:58 +02:00
deploy : pushInPre pushInProd
2017-06-02 02:27:48 +02:00
2017-06-27 03:46:43 +02:00
pushInPre : cleanoutput bin /output /wwwroot /version
2019-07-22 01:51:38 +02:00
sudo service kestrel-pre stop
sudo rm -rf $( DESTDIR) /approot
sudo cp -a bin/output/* $( DESTDIR)
sudo sync
sudo service kestrel-pre start
2017-06-02 02:27:48 +02:00
2017-06-27 03:46:43 +02:00
pushInProd : cleanoutput bin /output /wwwroot /version
2017-06-08 12:04:37 +02:00
i f e q ( $( git_status ) , 0 )
2019-07-22 01:51:38 +02:00
sudo service kestrel stop
sudo rm -rf $( PRODDESTDIR) /approot
sudo cp -a bin/output/* $( PRODDESTDIR)
sudo sync
sudo service kestrel start
2017-06-08 11:43:30 +02:00
e l s e
2018-05-04 10:45:45 +02:00
$( error EPRODANDGITSTATUS! Refus de pousser en production: des changements doivent être validés auprès du contrôle de versions.)
2017-06-08 11:43:30 +02:00
e n d i f
2018-04-20 16:16:54 +02:00
2019-09-05 15:22:48 +01:00
cleanPublish : pushInPre pushInProd
rm -rf bin/output/
2019-05-29 21:37:54 +01:00
%.min.js : %.js
jsmin < $^ > $@
%.min.css : %.css
jsmin < $^ > $@
2019-06-17 15:20:57 +01:00
%.Designer.cs : %.resx
2019-06-17 20:52:51 +01:00
strotygen -l -p -t -r "Yavsc.Resources." $^
2019-06-17 15:20:57 +01:00
prepare_code : $( BASERESXGEN )
web_rebuild :
make -C ../Yavsc.Abstract
make -C ../Yavsc.Server
make bin/Debug/dnx451/Yavsc.dll
2019-05-29 21:37:54 +01:00
minJs : $( MINJS )
minCss : $( MINCSS )
minify : minCss minJs
2019-06-21 09:20:13 +01:00
prepare_mvc_templates : $( SOURCE_DIR ) /scripts /configure /tools /mvc -code -generators /new -templates /ViewGenerator /Create .cshtml \
$( SOURCE_DIR) /scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Delete.cshtml \
$( SOURCE_DIR) /scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Edit.cshtml \
$( SOURCE_DIR) /scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/List.cshtml \
$( SOURCE_DIR) /scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Details.cshtml
cp $^ $( SOURCE_DIR) /packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/
$(BINTARGETPATH) : $( BASERESXGEN ) project .lock .json
2019-06-19 00:16:17 +01:00