cli now building against Yavsc

vnext
Paul Schneider 7 years ago
parent e8888407e9
commit b0c79ece68
8 changed files with 3330 additions and 239 deletions

@ -9,8 +9,8 @@ $(SUBDIRS):
$(MAKE) -C $@ VERSION=$(VERSION) $(MAKE) -C $@ VERSION=$(VERSION)
deploy: deploy:
$(MAKE) -C Yavsc.Abstract deploy $(MAKE) -C Yavsc.Abstract deploy VERSION=$(VERSION)
$(MAKE) -C Yavsc deploy $(MAKE) -C Yavsc deploy-pkg VERSION=$(VERSION)
.PHONY: all $(SUBDIRS) .PHONY: all $(SUBDIRS)

@ -1,3 +1,4 @@
PRJNAME=Yavsc
DESTDIR=/srv/www/yavscpre DESTDIR=/srv/www/yavscpre
PRODDESTDIR=/srv/www/yavsc PRODDESTDIR=/srv/www/yavsc
ASPNET_ENV=Development ASPNET_ENV=Development
@ -9,6 +10,11 @@ FRMWRK=dnx451
BINTARGET=Yavsc.dll BINTARGET=Yavsc.dll
BINTARGETPATH=bin/$(CONFIGURATION)/$(FRMWRK)/$(BINTARGET) BINTARGETPATH=bin/$(CONFIGURATION)/$(FRMWRK)/$(BINTARGET)
PKGFILENAME=$(PRJNAME).$(VERSION).nupkg
DESTPATH=.
PACKAGE=$(DESTPATH)/$(PKGFILENAME)
NUGETSOURCE=$(HOME)/Nupkgs/
all: $(BINTARGETPATH) all: $(BINTARGETPATH)
$(BINTARGETPATH): $(BINTARGETPATH):
@ -71,3 +77,22 @@ else
@echo EPRODANDGITSTATUS! Refus de pousser en production: des changements doivent être validés auprès du contrôle de versions. @echo EPRODANDGITSTATUS! Refus de pousser en production: des changements doivent être validés auprès du contrôle de versions.
git status git status
endif endif
$(PACKAGE): $(BINTARGETPATH)
nuget pack $(PRJNAME).nuspec -Version $(VERSION) -Properties config=$(CONFIGURATION)
clean:
rm $(PACKAGE)
$(BINARY): project.lock.json
dnu build --configuration $(CONFIGURATION)
project.lock.json: project.json
dnu restore
deploy-pkg: $(PACKAGE)
cp $(PACKAGE) $(NUGETSOURCE)

@ -18,6 +18,6 @@
<tags>Blog, POS, Web API</tags> <tags>Blog, POS, Web API</tags>
</metadata> </metadata>
<files> <files>
<file src="bin/$config$/net451/Yavsc.dll" target="lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10" /> <file src="bin/$config$/dnx451/Yavsc.dll" target="lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10" />
</files> </files>
</package> </package>

@ -125,10 +125,6 @@
"target": "project", "target": "project",
"type": "build" "type": "build"
}, },
"Yavsc.Server": {
"target": "project",
"type": "build"
},
"OAuth.AspNet.Token": { "OAuth.AspNet.Token": {
"target": "project", "target": "project",
"type": "build" "type": "build"

@ -16,7 +16,7 @@ using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework; using Microsoft.AspNet.Identity.EntityFramework;
// using Microsoft.AspNet.Localization; using Microsoft.AspNet.Localization;
using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Filters; using Microsoft.AspNet.Mvc.Filters;
using Microsoft.AspNet.Mvc.Razor; using Microsoft.AspNet.Mvc.Razor;
@ -35,15 +35,13 @@ namespace cli
var host = new WebHostBuilder(); var host = new WebHostBuilder();
var hostengnine = host.UseEnvironment("Develpment") var hostengnine = host.UseEnvironment("Develpment")
.UseServer("Yavsc.Server") .UseServer("cli")
.UseStartup<Startup>() .UseStartup<Startup>()
/*
.UseServices(services => {
Console.WriteLine($"> Using {services.Count} services:");
foreach (var s in services) Console.WriteLine($"> * {s.ServiceType}"); .UseServices(services => {
} ) Console.WriteLine($"> Using {services.Count} services:");
*/ foreach (var s in services) Console.WriteLine($"> * {s.ServiceType}");
})
.Build(); .Build();
var app = hostengnine.Start(); var app = hostengnine.Start();
@ -93,7 +91,6 @@ namespace cli
services.Configure<SiteSettings>(siteSettingsconf); services.Configure<SiteSettings>(siteSettingsconf);
var smtpSettingsconf = Configuration.GetSection("Smtp"); var smtpSettingsconf = Configuration.GetSection("Smtp");
services.Configure<SmtpSettings>(smtpSettingsconf); services.Configure<SmtpSettings>(smtpSettingsconf);
services.AddInstance(typeof(ILoggerFactory), new LoggerFactory()); services.AddInstance(typeof(ILoggerFactory), new LoggerFactory());
services.AddTransient(typeof(IEmailSender), typeof(MessageSender)); services.AddTransient(typeof(IEmailSender), typeof(MessageSender));
services.AddTransient(typeof(RazorEngineHost), typeof(YaRazorEngineHost)); services.AddTransient(typeof(RazorEngineHost), typeof(YaRazorEngineHost));
@ -107,6 +104,10 @@ namespace cli
services.AddLogging(); services.AddLogging();
services.AddTransient<EMailer>(); services.AddTransient<EMailer>();
services.AddLocalization(options =>
{
options.ResourcesPath = "Resources";
});
} }
public void Configure (IApplicationBuilder app, IHostingEnvironment env, public void Configure (IApplicationBuilder app, IHostingEnvironment env,

@ -25,7 +25,7 @@
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final", "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final",
"Microsoft.Framework.Configuration.Json": "1.0.0-*", "Microsoft.Framework.Configuration.Json": "1.0.0-*",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*", "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*",
"Yavsc": "1.0.5-rc9", "Yavsc": { "type": "build", "target": "project" },
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final", "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final" "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final"
}, },

File diff suppressed because it is too large Load Diff
Loading…