cli now building against Yavsc
This commit is contained in:
4
Makefile
4
Makefile
@ -9,8 +9,8 @@ $(SUBDIRS):
|
||||
$(MAKE) -C $@ VERSION=$(VERSION)
|
||||
|
||||
deploy:
|
||||
$(MAKE) -C Yavsc.Abstract deploy
|
||||
$(MAKE) -C Yavsc deploy
|
||||
$(MAKE) -C Yavsc.Abstract deploy VERSION=$(VERSION)
|
||||
$(MAKE) -C Yavsc deploy-pkg VERSION=$(VERSION)
|
||||
|
||||
.PHONY: all $(SUBDIRS)
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
PRJNAME=Yavsc
|
||||
DESTDIR=/srv/www/yavscpre
|
||||
PRODDESTDIR=/srv/www/yavsc
|
||||
ASPNET_ENV=Development
|
||||
@ -9,6 +10,11 @@ FRMWRK=dnx451
|
||||
BINTARGET=Yavsc.dll
|
||||
BINTARGETPATH=bin/$(CONFIGURATION)/$(FRMWRK)/$(BINTARGET)
|
||||
|
||||
PKGFILENAME=$(PRJNAME).$(VERSION).nupkg
|
||||
DESTPATH=.
|
||||
PACKAGE=$(DESTPATH)/$(PKGFILENAME)
|
||||
NUGETSOURCE=$(HOME)/Nupkgs/
|
||||
|
||||
all: $(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.
|
||||
git status
|
||||
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>
|
||||
</metadata>
|
||||
<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>
|
||||
</package>
|
||||
|
@ -125,10 +125,6 @@
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"Yavsc.Server": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"OAuth.AspNet.Token": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
|
@ -16,7 +16,7 @@ using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.Hosting;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
// using Microsoft.AspNet.Localization;
|
||||
using Microsoft.AspNet.Localization;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Filters;
|
||||
using Microsoft.AspNet.Mvc.Razor;
|
||||
@ -35,15 +35,13 @@ namespace cli
|
||||
var host = new WebHostBuilder();
|
||||
|
||||
var hostengnine = host.UseEnvironment("Develpment")
|
||||
.UseServer("Yavsc.Server")
|
||||
.UseServer("cli")
|
||||
.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();
|
||||
|
||||
var app = hostengnine.Start();
|
||||
@ -93,7 +91,6 @@ namespace cli
|
||||
services.Configure<SiteSettings>(siteSettingsconf);
|
||||
var smtpSettingsconf = Configuration.GetSection("Smtp");
|
||||
services.Configure<SmtpSettings>(smtpSettingsconf);
|
||||
|
||||
services.AddInstance(typeof(ILoggerFactory), new LoggerFactory());
|
||||
services.AddTransient(typeof(IEmailSender), typeof(MessageSender));
|
||||
services.AddTransient(typeof(RazorEngineHost), typeof(YaRazorEngineHost));
|
||||
@ -107,6 +104,10 @@ namespace cli
|
||||
services.AddLogging();
|
||||
services.AddTransient<EMailer>();
|
||||
|
||||
services.AddLocalization(options =>
|
||||
{
|
||||
options.ResourcesPath = "Resources";
|
||||
});
|
||||
}
|
||||
|
||||
public void Configure (IApplicationBuilder app, IHostingEnvironment env,
|
||||
|
@ -25,7 +25,7 @@
|
||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Framework.Configuration.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.Logging.Debug": "1.0.0-rc1-final"
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user