still refactoring
This commit is contained in:
26
Makefile
26
Makefile
@ -1,6 +1,6 @@
|
||||
include versioning.mk
|
||||
|
||||
|
||||
all: Yavsc
|
||||
all: deploy-pkgs
|
||||
|
||||
Yavsc.Abstract:
|
||||
$(MAKE) -C Yavsc.Abstract VERSION=$(VERSION)
|
||||
@ -12,13 +12,29 @@ Yavsc: Yavsc.Server
|
||||
make -C Yavsc restore
|
||||
make -C Yavsc VERSION=$(VERSION)
|
||||
|
||||
cli-deploy-pkg:
|
||||
make -C cli deploy-pkg VERSION=$(VERSION)
|
||||
Yavsc.Server-deploy-pkg:
|
||||
make -C Yavsc.Server deploy-pkg
|
||||
|
||||
cli: Yavsc
|
||||
Yavsc.Abstract-deploy-pkg:
|
||||
make -C Yavsc.Abstract deploy-pkg
|
||||
|
||||
cli-deploy-pkg:
|
||||
make -C cli deploy-pkg
|
||||
|
||||
cli: Yavsc.Server-deploy-pkg Yavsc.Abstract-deploy-pkg
|
||||
make -C cli restore
|
||||
make -C cli
|
||||
|
||||
deploy-pkgs: cli-deploy-pkg
|
||||
|
||||
memo:
|
||||
vim ~/TODO.md
|
||||
|
||||
|
||||
rc-num:
|
||||
@echo echo 1-alpha1 < $< ^ $^ @ $@
|
||||
|
||||
|
||||
.PHONY: all $(SUBDIRS)
|
||||
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
namespace Yavsc.Abstract
|
||||
{
|
||||
public class ConstantsFromAbstract
|
||||
{
|
||||
public const string EMailRegexp = @"^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$";
|
||||
|
||||
}
|
||||
}
|
@ -1,34 +1,3 @@
|
||||
CONFIGURATION=Release
|
||||
PRJNAME=Yavsc.Abstract
|
||||
BINTARGET=$(PRJNAME).dll
|
||||
PKGFILENAME=$(PRJNAME).$(VERSION).nupkg
|
||||
DESTPATH=.
|
||||
PACKAGE=$(DESTPATH)/$(PKGFILENAME)
|
||||
BINARY=bin/$(CONFIGURATION)//$(PRJNAME).dll
|
||||
FRAMEWORKALIAS=net451
|
||||
BINTARGETPATH=bin/$(CONFIGURATION)/$(FRAMEWORKALIAS)/$(BINTARGET)
|
||||
NUGETSOURCE=$(HOME)/Nupkgs/
|
||||
|
||||
all: $(BINTARGETPATH)
|
||||
|
||||
$(BINTARGETPATH):
|
||||
dnu build
|
||||
|
||||
|
||||
$(PACKAGE): $(BINARY)
|
||||
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)
|
||||
|
||||
.PHONY: $(PACKAGE)
|
||||
include ../versioning.mk
|
||||
include ../dnx.mk
|
||||
|
||||
|
@ -28,5 +28,7 @@ namespace Yavsc.Abstract.Templates
|
||||
_buffer = new StringBuilder();
|
||||
}
|
||||
|
||||
public abstract Task ExecuteAsync();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
<tags>yavsc</tags>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="bin/$config$/dnx451/Yavsc.Abstract.dll" target="lib/dnx451" />
|
||||
<file src="bin/$config$/net451/Yavsc.Abstract.dll" target="lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10" />
|
||||
</files>
|
||||
</package>
|
||||
|
@ -1,2 +1,5 @@
|
||||
include ../common.mk
|
||||
include ../versioning.mk
|
||||
include ../dnx.mk
|
||||
|
||||
all: $(BINTARGETPATH)
|
||||
|
||||
|
@ -5,6 +5,6 @@ namespace Yavsc.Services
|
||||
{
|
||||
public interface IEmailSender
|
||||
{
|
||||
Task<bool> SendEmailAsync(SiteSettings siteSettings, SmtpSettings smtpSettings, string username, string email, string subject, string message);
|
||||
Task<bool> SendEmailAsync(string username, string email, string subject, string message);
|
||||
}
|
||||
}
|
||||
|
@ -11,21 +11,17 @@ namespace Yavsc.Services
|
||||
public interface IGoogleCloudMessageSender
|
||||
{
|
||||
Task<MessageWithPayloadResponse> NotifyBookQueryAsync(
|
||||
GoogleAuthSettings googlesettings,
|
||||
IEnumerable<string> registrationId,
|
||||
RdvQueryEvent ev);
|
||||
|
||||
Task<MessageWithPayloadResponse> NotifyEstimateAsync(
|
||||
GoogleAuthSettings googlesettings,
|
||||
IEnumerable<string> registrationId,
|
||||
EstimationEvent ev);
|
||||
|
||||
Task<MessageWithPayloadResponse> NotifyHairCutQueryAsync(
|
||||
GoogleAuthSettings googlesettings,
|
||||
IEnumerable<string> registrationId,
|
||||
HairCutQueryEvent ev);
|
||||
Task<MessageWithPayloadResponse> NotifyAsync(
|
||||
GoogleAuthSettings _googleSettings,
|
||||
IEnumerable<string> regids,
|
||||
IEvent yaev);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ using System.Linq;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Server.Helpers;
|
||||
using Microsoft.Extensions.OptionsModel;
|
||||
|
||||
namespace Yavsc.Services
|
||||
{
|
||||
@ -24,13 +25,25 @@ namespace Yavsc.Services
|
||||
public class MessageSender : IEmailSender, IGoogleCloudMessageSender
|
||||
{
|
||||
private ILogger _logger;
|
||||
SiteSettings siteSettings;
|
||||
SmtpSettings smtpSettings;
|
||||
GoogleAuthSettings googleSettings;
|
||||
|
||||
public MessageSender(ILoggerFactory loggerFactory)
|
||||
public MessageSender(
|
||||
ILoggerFactory loggerFactory,
|
||||
IOptions<SiteSettings> sitesOptions,
|
||||
IOptions<SmtpSettings> smtpOptions,
|
||||
IOptions<GoogleAuthSettings> googleOptions
|
||||
)
|
||||
{
|
||||
_logger = loggerFactory.CreateLogger<MessageSender>();
|
||||
siteSettings = sitesOptions.Value;
|
||||
smtpSettings = smtpOptions.Value;
|
||||
googleSettings = googleOptions.Value;
|
||||
}
|
||||
|
||||
public async Task <MessageWithPayloadResponse> NotifyEvent<Event>
|
||||
( GoogleAuthSettings googleSettings, IEnumerable<string> regids, Event ev)
|
||||
( IEnumerable<string> regids, Event ev)
|
||||
where Event : IEvent
|
||||
{
|
||||
if (ev == null)
|
||||
@ -69,23 +82,23 @@ namespace Yavsc.Services
|
||||
/// <returns>a MessageWithPayloadResponse,
|
||||
/// <c>bool somethingsent = (response.failure == 0 && response.success > 0)</c>
|
||||
/// </returns>
|
||||
public async Task<MessageWithPayloadResponse> NotifyBookQueryAsync(GoogleAuthSettings googleSettings, IEnumerable<string> registrationIds, RdvQueryEvent ev)
|
||||
public async Task<MessageWithPayloadResponse> NotifyBookQueryAsync( IEnumerable<string> registrationIds, RdvQueryEvent ev)
|
||||
{
|
||||
return await NotifyEvent<RdvQueryEvent>(googleSettings,registrationIds, ev);
|
||||
return await NotifyEvent<RdvQueryEvent>(registrationIds, ev);
|
||||
}
|
||||
|
||||
public async Task<MessageWithPayloadResponse> NotifyEstimateAsync(GoogleAuthSettings googleSettings, IEnumerable<string> registrationIds, EstimationEvent ev)
|
||||
public async Task<MessageWithPayloadResponse> NotifyEstimateAsync(IEnumerable<string> registrationIds, EstimationEvent ev)
|
||||
{
|
||||
return await NotifyEvent<EstimationEvent>(googleSettings,registrationIds, ev);
|
||||
return await NotifyEvent<EstimationEvent>(registrationIds, ev);
|
||||
}
|
||||
|
||||
public async Task<MessageWithPayloadResponse> NotifyHairCutQueryAsync(GoogleAuthSettings googleSettings,
|
||||
public async Task<MessageWithPayloadResponse> NotifyHairCutQueryAsync(
|
||||
IEnumerable<string> registrationIds, HairCutQueryEvent ev)
|
||||
{
|
||||
return await NotifyEvent<HairCutQueryEvent>(googleSettings, registrationIds, ev);
|
||||
return await NotifyEvent<HairCutQueryEvent>(registrationIds, ev);
|
||||
}
|
||||
|
||||
public Task<bool> SendEmailAsync(SiteSettings siteSettings, SmtpSettings smtpSettings, string username, string email, string subject, string message)
|
||||
public Task<bool> SendEmailAsync(string username, string email, string subject, string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -120,7 +133,8 @@ namespace Yavsc.Services
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<MessageWithPayloadResponse> NotifyAsync(GoogleAuthSettings _googleSettings, IEnumerable<string> regids, IEvent yaev)
|
||||
public Task<MessageWithPayloadResponse> NotifyAsync(
|
||||
IEnumerable<string> regids, IEvent yaev)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
@ -4,8 +4,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Yavsc.Templates
|
||||
{
|
||||
public class UserOrientedTemplate: Template
|
||||
public abstract class UserOrientedTemplate: Template
|
||||
{
|
||||
public ApplicationUser User { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -25,6 +25,7 @@
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="bin/$config$/dnx451/Yavsc.Server.dll" target="lib/dnx451" />
|
||||
<file src="bin/$config$/net451/Yavsc.Server.dll" target="lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10" />
|
||||
</files>
|
||||
</package>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"version": "1.0.5-*",
|
||||
"description": "Yavsc server common library",
|
||||
"authors": [
|
||||
"Paul Schneider <paul@pschneider.fr>"
|
||||
@ -63,10 +63,7 @@
|
||||
"EntityFramework7.Npgsql": "3.1.0-rc1-3",
|
||||
"EntityFramework7.Npgsql.Design": "3.1.0-rc1-5",
|
||||
"Microsoft.CodeAnalysis.CSharp": "1.1.0-rc1-20151109-01",
|
||||
"Yavsc.Abstract": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
}
|
||||
"Yavsc.Abstract": "1.0.5-rc17"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {
|
||||
@ -79,9 +76,9 @@
|
||||
"System.ComponentModel.DataAnnotations": "4.0.0",
|
||||
"System.Json": "4.0.0",
|
||||
"System.Net": "4.0.0.0",
|
||||
"System.Net.Http": "4.0.0.0",
|
||||
"System.Xml": "4.0.0.0",
|
||||
"System": "4.0.0.0"
|
||||
"System.Net.Http": "4.0.0",
|
||||
"System.Xml": "4.0.0",
|
||||
"System": "4.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -12816,15 +12816,16 @@
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
"": [
|
||||
"Newtonsoft.Json >= 9.0.1",
|
||||
"Yavsc.Abstract ",
|
||||
"Microsoft.AspNet.Identity >= 3.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Identity.EntityFramework >= 3.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.Facebook >= 1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.Twitter >= 1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.OAuth >= 1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Authentication.Cookies >= 1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Hosting >= 1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Http.Extensions >= 1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Identity >= 3.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Identity.EntityFramework >= 3.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Mvc.TagHelpers >= 6.0.0-rc1-final",
|
||||
"Newtonsoft.Json >= 9.0.1",
|
||||
"Gapi.net45 >= 1.0.0",
|
||||
"PayPalMerchant-net451 >= 2.7.109",
|
||||
"MailKit >= 1.12.0",
|
||||
@ -12832,9 +12833,8 @@
|
||||
"Microsoft.AspNet.Localization >= 1.0.0-rc1-final",
|
||||
"EntityFramework7.Npgsql >= 3.1.0-rc1-3",
|
||||
"EntityFramework7.Npgsql.Design >= 3.1.0-rc1-5",
|
||||
"Microsoft.AspNet.Mvc.TagHelpers >= 6.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Http.Extensions >= 1.0.0-rc1-final",
|
||||
"Microsoft.CodeAnalysis.CSharp >= 1.1.0-rc1-20151109-01"
|
||||
"Microsoft.CodeAnalysis.CSharp >= 1.1.0-rc1-20151109-01",
|
||||
"Yavsc.Abstract >= 1.0.5-rc17"
|
||||
],
|
||||
"DNX,Version=v4.5.1": [
|
||||
"fx/System.Json >= 4.0.0"
|
||||
|
@ -1 +0,0 @@
|
||||
15
|
@ -130,7 +130,7 @@ namespace Yavsc.ApiControllers
|
||||
var regids = estimate.Client.Devices.Select(d => d.GCMRegistrationId).ToArray();
|
||||
bool gcmSent = false;
|
||||
if (regids.Length>0) {
|
||||
var grep = await _GCMSender.NotifyEstimateAsync(_googleSettings,regids,yaev);
|
||||
var grep = await _GCMSender.NotifyEstimateAsync(regids,yaev);
|
||||
gcmSent = grep.success>0;
|
||||
}
|
||||
return Ok (new { ProviderValidationDate = estimate.ProviderValidationDate, GCMSent = gcmSent });
|
||||
|
@ -30,7 +30,6 @@ namespace Yavsc.Controllers
|
||||
// private readonly ISmsSender _smsSender;
|
||||
private readonly ILogger _logger;
|
||||
SiteSettings _siteSettings;
|
||||
SmtpSettings _smtpSettings;
|
||||
TwilioSettings _twilioSettings;
|
||||
|
||||
IStringLocalizer _localizer;
|
||||
@ -44,7 +43,6 @@ namespace Yavsc.Controllers
|
||||
SignInManager<ApplicationUser> signInManager,
|
||||
IEmailSender emailSender,
|
||||
IOptions<SiteSettings> siteSettings,
|
||||
IOptions<SmtpSettings> smtpSettings,
|
||||
ILoggerFactory loggerFactory, IOptions<TwilioSettings> twilioSettings,
|
||||
IStringLocalizer<Yavsc.Resources.YavscLocalisation> localizer,
|
||||
ApplicationDbContext dbContext)
|
||||
@ -55,7 +53,6 @@ namespace Yavsc.Controllers
|
||||
// _userManager.RegisterTokenProvider("Phone", new UserTokenProvider());
|
||||
_emailSender = emailSender;
|
||||
_siteSettings = siteSettings.Value;
|
||||
_smtpSettings = smtpSettings.Value;
|
||||
_twilioSettings = twilioSettings.Value;
|
||||
_logger = loggerFactory.CreateLogger<AccountController>();
|
||||
_localizer = localizer;
|
||||
@ -212,7 +209,7 @@ namespace Yavsc.Controllers
|
||||
if (result.Succeeded)
|
||||
{
|
||||
_logger.LogInformation(3, "User created a new account with password.");
|
||||
await _emailSender.SendEmailAsync(_siteSettings, _smtpSettings, Startup.SiteSetup.Owner.Name, Startup.SiteSetup.Owner.EMail,
|
||||
await _emailSender.SendEmailAsync(Startup.SiteSetup.Owner.Name, Startup.SiteSetup.Owner.EMail,
|
||||
$"[{_siteSettings.Title}] Inscription avec mot de passe: {user.UserName} ", $"{user.Id}/{user.UserName}/{user.Email}");
|
||||
|
||||
// TODO user.DiskQuota = Startup.SiteSetup.UserFiles.Quota;
|
||||
@ -220,7 +217,7 @@ namespace Yavsc.Controllers
|
||||
// Send an email with this link
|
||||
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
|
||||
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
||||
var emailSent = await _emailSender.SendEmailAsync(_siteSettings, _smtpSettings, model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
|
||||
var emailSent = await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
|
||||
string.Format(_localizer["ConfirmYourAccountBody"], _siteSettings.Title, callbackUrl, _siteSettings.Slogan, _siteSettings.Audience));
|
||||
await _signInManager.SignInAsync(user, isPersistent: false);
|
||||
if (!emailSent)
|
||||
@ -258,7 +255,7 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
|
||||
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
||||
var res = await _emailSender.SendEmailAsync(_siteSettings, _smtpSettings, user.UserName, user.Email, "Confirm your account",
|
||||
var res = await _emailSender.SendEmailAsync(user.UserName, user.Email, "Confirm your account",
|
||||
"Please confirm your account by clicking this link: <a href=\"" + callbackUrl + "\">link</a>");
|
||||
return res;
|
||||
}
|
||||
@ -371,7 +368,7 @@ namespace Yavsc.Controllers
|
||||
await _signInManager.SignInAsync(user, isPersistent: false);
|
||||
|
||||
|
||||
await _emailSender.SendEmailAsync(_siteSettings, _smtpSettings, Startup.SiteSetup.Owner.Name, Startup.SiteSetup.Owner.EMail,
|
||||
await _emailSender.SendEmailAsync(Startup.SiteSetup.Owner.Name, Startup.SiteSetup.Owner.EMail,
|
||||
$"[{_siteSettings.Title}] Inscription via {info.LoginProvider}: {user.UserName} ", $"{user.Id}/{user.UserName}/{user.Email}");
|
||||
|
||||
_logger.LogInformation(6, "User created an account using {Name} provider.", info.LoginProvider);
|
||||
@ -450,7 +447,7 @@ namespace Yavsc.Controllers
|
||||
// Send an email with this link
|
||||
var code = await _userManager.GeneratePasswordResetTokenAsync(user);
|
||||
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
||||
await _emailSender.SendEmailAsync(_siteSettings, _smtpSettings, user.UserName, user.Email, _localizer["Reset Password"],
|
||||
await _emailSender.SendEmailAsync(user.UserName, user.Email, _localizer["Reset Password"],
|
||||
_localizer["Please reset your password by following this link:"] + " <" + callbackUrl + ">");
|
||||
return View("ForgotPasswordConfirmation");
|
||||
}
|
||||
@ -565,7 +562,7 @@ namespace Yavsc.Controllers
|
||||
}
|
||||
else // if (model.SelectedProvider == Constants.EMailFactor || model.SelectedProvider == "Default" )
|
||||
{
|
||||
await _emailSender.SendEmailAsync(_siteSettings, _smtpSettings,user.UserName, await _userManager.GetEmailAsync(user), "Security Code", message);
|
||||
await _emailSender.SendEmailAsync(user.UserName, await _userManager.GetEmailAsync(user), "Security Code", message);
|
||||
}
|
||||
return RedirectToAction(nameof(VerifyCode), new { Provider = model.SelectedProvider, ReturnUrl = model.ReturnUrl, RememberMe = model.RememberMe });
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ namespace Yavsc.Controllers
|
||||
if (pro.Performer.Devices.Count > 0) {
|
||||
var regids = command.PerformerProfile.Performer
|
||||
.Devices.Select(d => d.GCMRegistrationId);
|
||||
grep = await _GCMSender.NotifyBookQueryAsync(_googleSettings,regids,yaev);
|
||||
grep = await _GCMSender.NotifyBookQueryAsync(regids,yaev);
|
||||
}
|
||||
|
||||
// TODO setup a profile choice to allow notifications
|
||||
@ -181,7 +181,6 @@ namespace Yavsc.Controllers
|
||||
ViewBag.GooglePayload=grep;
|
||||
|
||||
ViewBag.EmailSent = await _emailSender.SendEmailAsync(
|
||||
_siteSettings, _smtpSettings,
|
||||
command.PerformerProfile.Performer.UserName,
|
||||
command.PerformerProfile.Performer.Email,
|
||||
$"{command.Client.UserName} (un client) vous demande un rendez-vous",
|
||||
|
@ -103,7 +103,7 @@ namespace Yavsc.Controllers
|
||||
var regids = command.PerformerProfile.Performer
|
||||
.Devices.Select(d => d.GCMRegistrationId);
|
||||
|
||||
grep = await _GCMSender.NotifyAsync(_googleSettings, regids, yaev);
|
||||
grep = await _GCMSender.NotifyAsync(regids, yaev);
|
||||
}
|
||||
// TODO setup a profile choice to allow notifications
|
||||
// both on mailbox and mobile
|
||||
@ -112,7 +112,6 @@ namespace Yavsc.Controllers
|
||||
}
|
||||
|
||||
ViewBag.EmailSent = await _emailSender.SendEmailAsync(
|
||||
_siteSettings, _smtpSettings,
|
||||
command.PerformerProfile.Performer.UserName,
|
||||
command.PerformerProfile.Performer.Email,
|
||||
yaev.Topic,
|
||||
@ -275,7 +274,7 @@ namespace Yavsc.Controllers
|
||||
if (pro.Performer.Devices.Count > 0)
|
||||
{
|
||||
var regids = pro.Performer.Devices.Select(d => d.GCMRegistrationId);
|
||||
grep = await _GCMSender.NotifyHairCutQueryAsync(_googleSettings, regids, yaev);
|
||||
grep = await _GCMSender.NotifyHairCutQueryAsync(regids, yaev);
|
||||
}
|
||||
// TODO setup a profile choice to allow notifications
|
||||
// both on mailbox and mobile
|
||||
@ -300,7 +299,6 @@ namespace Yavsc.Controllers
|
||||
else _logger.LogWarning($"Calendar: {pro.Performer.DedicatedGoogleCalendar != null}\nEventDate: {yaev.EventDate != null}");
|
||||
|
||||
await _emailSender.SendEmailAsync(
|
||||
_siteSettings, _smtpSettings,
|
||||
pro.Performer.UserName,
|
||||
pro.Performer.Email,
|
||||
$"{yaev.Client.UserName}: {yaev.Reason}",
|
||||
@ -436,7 +434,7 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
var regids = command.PerformerProfile.Performer
|
||||
.Devices.Select(d => d.GCMRegistrationId);
|
||||
grep = await _GCMSender.NotifyHairCutQueryAsync(_googleSettings, regids, yaev);
|
||||
grep = await _GCMSender.NotifyHairCutQueryAsync(regids, yaev);
|
||||
}
|
||||
// TODO setup a profile choice to allow notifications
|
||||
// both on mailbox and mobile, and to allow calendar event insertion.
|
||||
@ -458,7 +456,6 @@ namespace Yavsc.Controllers
|
||||
}
|
||||
|
||||
await _emailSender.SendEmailAsync(
|
||||
_siteSettings, _smtpSettings,
|
||||
command.PerformerProfile.Performer.UserName,
|
||||
command.PerformerProfile.Performer.Email,
|
||||
yaev.Topic + " " + yaev.Sender,
|
||||
|
@ -3,7 +3,13 @@ PRODDESTDIR=/srv/www/yavsc
|
||||
HOSTING=localhost
|
||||
HOSTADMIN=root
|
||||
|
||||
include ../common.mk
|
||||
include ../versioning.mk
|
||||
include ../dnx.mk
|
||||
|
||||
all: $(BINTARGETPATH)
|
||||
|
||||
web: project.lock.json
|
||||
ASPNET_ENV=$(ASPNET_ENV) dnx web --configuration=$(CONFIGURATION)
|
||||
|
||||
status:
|
||||
ifeq ($(git_status),0)
|
||||
@ -32,7 +38,7 @@ ifeq ($(git_status),0)
|
||||
ssh $(HOSTADMIN)@$(HOSTING) sudo sync
|
||||
ssh $(HOSTADMIN)@$(HOSTING) sudo service kestrel start
|
||||
else
|
||||
@echo EPRODANDGITSTATUS! Refus de pousser en production: des changements doivent être validés auprès du contrôle de versions.
|
||||
$(error EPRODANDGITSTATUS! Refus de pousser en production: des changements doivent être validés auprès du contrôle de versions.)
|
||||
git status
|
||||
endif
|
||||
|
||||
|
@ -126,19 +126,15 @@
|
||||
"Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
|
||||
"System.Json": "4.0.20126.16343",
|
||||
"Yavsc.Abstract": {
|
||||
"target": "project",
|
||||
"type": "default"
|
||||
},
|
||||
"Yavsc.Server": {
|
||||
"target": "project",
|
||||
"type": "default"
|
||||
},
|
||||
"OAuth.AspNet.Token": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"OAuth.AspNet.AuthServer": {
|
||||
"target": "project",
|
||||
"type": "build"
|
||||
},
|
||||
"PayPalMerchant-net451": {
|
||||
|
@ -1 +0,0 @@
|
||||
15
|
@ -7,14 +7,14 @@
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
}
|
||||
}
|
||||
@ -24,14 +24,14 @@
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
}
|
||||
}
|
||||
@ -41,14 +41,14 @@
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
}
|
||||
}
|
||||
@ -58,14 +58,14 @@
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
}
|
||||
}
|
||||
@ -75,14 +75,14 @@
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
}
|
||||
}
|
||||
@ -92,14 +92,14 @@
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
}
|
||||
}
|
||||
@ -109,14 +109,14 @@
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/uap10.0/Xamarin.Forms.Core.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Platform.UAP.dll": {},
|
||||
"lib/uap10.0/Xamarin.Forms.Xaml.dll": {}
|
||||
}
|
||||
}
|
||||
|
22
build
22
build
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
PRJS="YavscLib/YavscLib ZicMoove/ZicMoove/ZicMoove ZicMoove/ZicMoove.Droid/ZicMoove.Droid"
|
||||
MSB=msbuild.exe
|
||||
|
||||
if [ "clean" = "$1" ]; then
|
||||
echo \< $1
|
||||
rm -rf YavscLib/YavscLib/obj ZicMoove/*/obj
|
||||
fi
|
||||
|
||||
for p in $PRJS
|
||||
do
|
||||
|
||||
nuget restore $p.csproj -PackagesDirectory packages
|
||||
|
||||
done
|
||||
|
||||
$MSB /t:UpdateAndroidResources /p:Configuration=Debug ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj
|
||||
|
||||
for p in $PRJS
|
||||
do
|
||||
$MSB /t:Build /p:Configuration=Debug $p.csproj
|
||||
done
|
33
build.sh
33
build.sh
@ -1,27 +1,22 @@
|
||||
#!/bin/sh
|
||||
PRJS="YavscLib/YavscLib ZicMoove/ZicMoove/ZicMoove ZicMoove/ZicMoove.Droid/ZicMoove.Droid"
|
||||
MSB=msbuild.exe
|
||||
|
||||
BUILDCMD=MSBuild.exe
|
||||
|
||||
PATH+=':/cygdrive/c/cygwin64/bin'
|
||||
|
||||
for p in 'C:\Program Files (x86)\MSBuild\14.0\Bin' 'C:\Users\paul\bin' 'C:\Users\paul\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin' 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools' 'C:\Program Files (x86)\Microsoft Visual Studio14.0\Common7\IDE\' 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN' 'C:\Windows\Microsoft.NET\Framework\v4.0.30319' 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCPackages' 'C:\Program Files (x86)\HTML Help Workshop' 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools' 'C:\Program Files (x86)\Windows Kits\10\bin\x86' 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\' 'C:\ProgramData\Oracle\Java\javapath' 'C:\Program Files\dotnet' 'C:\Program Files (x86)\Microsoft VS Code\bin'
|
||||
do
|
||||
PATH+=:`cygpath $p`
|
||||
done
|
||||
|
||||
|
||||
if [[ "$BUILDCONFIG" == "" ]]
|
||||
then
|
||||
BUILDCONFIG="Lua Yavsc ZicMoove Debug"
|
||||
if [ "clean" = "$1" ]; then
|
||||
echo \< $1
|
||||
rm -rf YavscLib/YavscLib/obj ZicMoove/*/obj
|
||||
fi
|
||||
echo "Building $BUILDCONFIG ..."
|
||||
|
||||
for conf in $BUILDCONFIG
|
||||
for p in $PRJS
|
||||
do
|
||||
$BUILDCMD /p:Configuration=$conf /t:SignAndroidPackage ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj /logger:"Kobush.Build.Logging.XmlLogger,Kobush.Build.dll;build-$conf-result.xml"
|
||||
xsltproc -o "build-$conf-result.html" "msbuild.xsl" "build-$conf-result.xml"
|
||||
|
||||
nuget restore $p.csproj -PackagesDirectory packages
|
||||
|
||||
done
|
||||
|
||||
$MSB /t:UpdateAndroidResources /p:Configuration=Debug ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj
|
||||
|
||||
# ;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow
|
||||
# \;;;;;;;;;;C:\Program Files (x86)\PHP\;C:\csvn\bin\;C:\csvn\Python25\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;\;
|
||||
for p in $PRJS
|
||||
do
|
||||
$MSB /t:Build /p:Configuration=Debug $p.csproj
|
||||
done
|
||||
|
BIN
build/Yavsc.1.0.5-rc17.nupkg
Normal file
BIN
build/Yavsc.1.0.5-rc17.nupkg
Normal file
Binary file not shown.
BIN
build/Yavsc.Abstract.1.0.5-rc17.nupkg
Normal file
BIN
build/Yavsc.Abstract.1.0.5-rc17.nupkg
Normal file
Binary file not shown.
BIN
build/Yavsc.Server.1.0.5-rc17.nupkg
Normal file
BIN
build/Yavsc.Server.1.0.5-rc17.nupkg
Normal file
Binary file not shown.
25
cli/Makefile
25
cli/Makefile
@ -1,28 +1,19 @@
|
||||
include ../common.mk
|
||||
include ../versioning.mk
|
||||
include ../dnx.mk
|
||||
|
||||
MSBUILD=msbuild
|
||||
|
||||
|
||||
all: build
|
||||
|
||||
build: project.lock.json
|
||||
ASPNET_ENV=$(ASPNET_ENV) ASPNET_LOG_LEVEL=$(ASPNET_LOG_LEVEL) dnu build --configuration=$(CONFIGURATION)
|
||||
|
||||
restore:
|
||||
touch project.json
|
||||
dnu restore
|
||||
all: $(BINTARGETPATH)
|
||||
|
||||
msbuild-restore:
|
||||
$(MSBUILD) cli.csproj /t:Restore
|
||||
|
||||
project.lock.json: project.json
|
||||
dnu restore
|
||||
|
||||
run: project.lock.json
|
||||
ASPNET_ENV=Development ASPNET_LOG_LEVEL=$(ASPNET_LOG_LEVEL) dnx run --configuration=$(CONFIGURATION)
|
||||
ASPNET_ENV=$(ASPNET_ENV) dnx run --configuration=$(CONFIGURATION)
|
||||
|
||||
info:
|
||||
@echo $(PRJNAME)
|
||||
|
||||
|
||||
deploy-pkg: $(PACKAGE)
|
||||
cp $(PACKAGE) $(NUGETSOURCE)
|
||||
|
||||
.PHONY: $(BINARY)
|
||||
|
||||
|
BIN
cli/Yavsc.1.0.5-rc15.nupkg
Normal file
BIN
cli/Yavsc.1.0.5-rc15.nupkg
Normal file
Binary file not shown.
@ -7,7 +7,7 @@ using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Server
|
||||
{
|
||||
public class YavscServerFactory : IServerFactory
|
||||
public class cliServerFactory : IServerFactory
|
||||
{
|
||||
public IFeatureCollection Initialize(IConfiguration configuration)
|
||||
{
|
||||
|
@ -107,6 +107,10 @@
|
||||
<PackageReference Include="Microsoft.Dnx.Compilation.Abstractions" Version="1.0.0-rc1-final" />
|
||||
<PackageReference Include="Microsoft.Dnx.Compilation.CSharp.Abstractions" Version="1.0.0-rc1-final" />
|
||||
<PackageReference Include="Microsoft.Dnx.Compilation.CSharp.Common" Version="1.0.0-rc1-final" />
|
||||
<PackageReference Include="Microsoft.Dnx.Compilation.CSharp.Common" Version="1.0.0-rc1-final" />
|
||||
<PackageReference Include="Yavsc.Server" Version="1.0.5-rc17" />
|
||||
<PackageReference Include="Yavsc.Abstract" Version="1.0.5-rc17" />
|
||||
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Services\" />
|
||||
|
26
cli/cli.nuspec
Normal file
26
cli/cli.nuspec
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<id>cli</id>
|
||||
<title>Yavsc - cli</title>
|
||||
<version>$version$</version>
|
||||
<authors>Paul Schneider</authors>
|
||||
<owners>Paul Schneider</owners>
|
||||
<licenseUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/License.md</licenseUrl>
|
||||
<projectUrl>https://github.com/pazof/yavsc/README.md</projectUrl>
|
||||
<iconUrl>https://github.com/pazof/yavsc/blob/vnext/Yavsc/wwwroot/images/yavsc.png</iconUrl>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<description>
|
||||
A command line interface to Yavsc server runtime
|
||||
</description>
|
||||
<summary>
|
||||
</summary>
|
||||
<tags>Blog, POS, Web API</tags>
|
||||
<dependencies>
|
||||
<dependency id="Yavsc.Server" version="$version$"></dependency>
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="bin/$config$/dnx451/cli.dll" target="lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10" />
|
||||
</files>
|
||||
</package>
|
@ -44,13 +44,13 @@
|
||||
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
|
||||
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
|
||||
"Newtonsoft.Json": "9.0.1",
|
||||
"Yavsc": {
|
||||
"version": "1.0.5-rc14",
|
||||
"target": "package"
|
||||
},
|
||||
"Yavsc.Abstract": {
|
||||
"version": "1.0.5-rc14",
|
||||
"target": "package"
|
||||
"target": "package",
|
||||
"version": "1.0.5-rc17"
|
||||
},
|
||||
"Yavsc.Server": {
|
||||
"target": "package",
|
||||
"version": "1.0.5-rc17"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
|
@ -2108,25 +2108,29 @@
|
||||
"lib/net45/_._": {}
|
||||
}
|
||||
},
|
||||
"Yavsc/1.0.5-rc14": {
|
||||
"Yavsc.Abstract/1.0.5-rc17": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Yavsc.Abstract": "1.0.5-rc14"
|
||||
},
|
||||
"compile": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.dll": {}
|
||||
"lib/dnx451/Yavsc.Abstract.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.dll": {}
|
||||
"lib/dnx451/Yavsc.Abstract.dll": {}
|
||||
}
|
||||
},
|
||||
"Yavsc.Abstract/1.0.5-rc14": {
|
||||
"Yavsc.Server/1.0.5-rc17": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
|
||||
"Yavsc.Abstract": "1.0.5-rc17"
|
||||
},
|
||||
"compile": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.Abstract.dll": {}
|
||||
"lib/dnx451/Yavsc.Server.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.Abstract.dll": {}
|
||||
"lib/dnx451/Yavsc.Server.dll": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -4236,25 +4240,29 @@
|
||||
"lib/net45/_._": {}
|
||||
}
|
||||
},
|
||||
"Yavsc/1.0.5-rc14": {
|
||||
"Yavsc.Abstract/1.0.5-rc17": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Yavsc.Abstract": "1.0.5-rc14"
|
||||
},
|
||||
"compile": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.dll": {}
|
||||
"lib/dnx451/Yavsc.Abstract.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.dll": {}
|
||||
"lib/dnx451/Yavsc.Abstract.dll": {}
|
||||
}
|
||||
},
|
||||
"Yavsc.Abstract/1.0.5-rc14": {
|
||||
"Yavsc.Server/1.0.5-rc17": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
|
||||
"Yavsc.Abstract": "1.0.5-rc17"
|
||||
},
|
||||
"compile": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.Abstract.dll": {}
|
||||
"lib/dnx451/Yavsc.Server.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.Abstract.dll": {}
|
||||
"lib/dnx451/Yavsc.Server.dll": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -6364,25 +6372,29 @@
|
||||
"lib/net45/_._": {}
|
||||
}
|
||||
},
|
||||
"Yavsc/1.0.5-rc14": {
|
||||
"Yavsc.Abstract/1.0.5-rc17": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Yavsc.Abstract": "1.0.5-rc14"
|
||||
},
|
||||
"compile": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.dll": {}
|
||||
"lib/dnx451/Yavsc.Abstract.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.dll": {}
|
||||
"lib/dnx451/Yavsc.Abstract.dll": {}
|
||||
}
|
||||
},
|
||||
"Yavsc.Abstract/1.0.5-rc14": {
|
||||
"Yavsc.Server/1.0.5-rc17": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
|
||||
"Yavsc.Abstract": "1.0.5-rc17"
|
||||
},
|
||||
"compile": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.Abstract.dll": {}
|
||||
"lib/dnx451/Yavsc.Server.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.Abstract.dll": {}
|
||||
"lib/dnx451/Yavsc.Server.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8509,24 +8521,26 @@
|
||||
"system.threading.nuspec"
|
||||
]
|
||||
},
|
||||
"Yavsc/1.0.5-rc14": {
|
||||
"Yavsc.Abstract/1.0.5-rc17": {
|
||||
"type": "package",
|
||||
"sha512": "qh7XoqBfHICTJuu7nwwOh9Wu7D8vntKvbpKPyiV9F61cXxssRBU0mlhmAfWfVmMeDOadTJMePXP43RDDjSxWpA==",
|
||||
"sha512": "/uGlH4QFDBlr7wrmZERcuhKaGhRS+SEONqI+zWpwKXctWkMSbX/QauqIsrrWLWke/6JiC2yxSfo5HWpETy3L0w==",
|
||||
"files": [
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.dll",
|
||||
"Yavsc.1.0.5-rc14.nupkg",
|
||||
"Yavsc.1.0.5-rc14.nupkg.sha512",
|
||||
"Yavsc.nuspec"
|
||||
"lib/dnx451/Yavsc.Abstract.dll",
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.Abstract.dll",
|
||||
"Yavsc.Abstract.1.0.5-rc17.nupkg",
|
||||
"Yavsc.Abstract.1.0.5-rc17.nupkg.sha512",
|
||||
"Yavsc.Abstract.nuspec"
|
||||
]
|
||||
},
|
||||
"Yavsc.Abstract/1.0.5-rc14": {
|
||||
"Yavsc.Server/1.0.5-rc17": {
|
||||
"type": "package",
|
||||
"sha512": "89rsGd4JcnNZkiEQEZU1hYj4YqxrPsDgePE+7U9XZJf28lmhCyFU86bOQHJiAoTow3q4dbVP/Wp2lDxNpMKuLA==",
|
||||
"sha512": "QSqJadauqDNl7JwdKIjUiBGjRRGhgD5EP8uH1O/E9O0yk86xUnpdNDdCYybkM5DsWnQROUjmtTn0IrTb1eZegg==",
|
||||
"files": [
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.Abstract.dll",
|
||||
"Yavsc.Abstract.1.0.5-rc14.nupkg",
|
||||
"Yavsc.Abstract.1.0.5-rc14.nupkg.sha512",
|
||||
"Yavsc.Abstract.nuspec"
|
||||
"lib/dnx451/Yavsc.Server.dll",
|
||||
"lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Yavsc.Server.dll",
|
||||
"Yavsc.Server.1.0.5-rc17.nupkg",
|
||||
"Yavsc.Server.1.0.5-rc17.nupkg.sha512",
|
||||
"Yavsc.Server.nuspec"
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -8558,8 +8572,8 @@
|
||||
"Microsoft.Framework.Configuration.Json >= 1.0.0-beta8",
|
||||
"Microsoft.Framework.ConfigurationModel.Json >= 1.0.0-beta4",
|
||||
"Newtonsoft.Json >= 9.0.1",
|
||||
"Yavsc >= 1.0.5-rc14",
|
||||
"Yavsc.Abstract >= 1.0.5-rc14"
|
||||
"Yavsc.Abstract >= 1.0.5-rc17",
|
||||
"Yavsc.Server >= 1.0.5-rc17"
|
||||
],
|
||||
"DNX,Version=v4.5.1": []
|
||||
}
|
||||
|
87
common.mk
87
common.mk
@ -1,87 +0,0 @@
|
||||
# Common defs
|
||||
|
||||
MAKE=make
|
||||
FRAMEWORK=dnx451
|
||||
rc_num := $(shell cat rc-num.txt)
|
||||
VERSION=1.0.5-rc$(rc_num)
|
||||
CONFIGURATION=Release
|
||||
PRJNAME := $(shell basename `pwd -P` .dll)
|
||||
PKGFILENAME=$(PRJNAME).$(VERSION).nupkg
|
||||
BINARY=bin/$(CONFIGURATION)/$(FRAMEWORK)/$(PRJNAME).dll
|
||||
NUGETSOURCE=$(HOME)/Nupkgs/
|
||||
ASPNET_ENV=Development
|
||||
ASPNET_LOG_LEVEL=Debug
|
||||
# nuget package destination, at generation time
|
||||
HOSTING=localhost
|
||||
HOSTADMIN=root
|
||||
FRAMEWORKALIAS=dnx451
|
||||
BINTARGET=$(PRJNAME).dll
|
||||
BINTARGETPATH=bin/$(CONFIGURATION)/$(FRAMEWORKALIAS)/$(BINTARGET)
|
||||
|
||||
# OBS SUBDIRS=Yavsc.Server Yavsc.Abstract Yavsc cli
|
||||
#
|
||||
|
||||
# Git commit hash, in order to not publish some uncrontrolled code in production environment
|
||||
#
|
||||
|
||||
git_status := $(shell git status -s --porcelain |wc -l)
|
||||
|
||||
all: build
|
||||
|
||||
rc-num.txt:
|
||||
ifndef rc-num
|
||||
@echo Generating rc-num.txt with: $(shell cat ../rc-num.txt || echo 1) > $@
|
||||
@echo $(shell cat ../rc-num.txt || echo 1) > $@
|
||||
rc_num := $(shell cat rc-num.txt)
|
||||
else
|
||||
@echo 'Got rc num : $(rc_num)'
|
||||
endif
|
||||
|
||||
rc-num.txt-check: rc-num.txt
|
||||
ifndef rc_num
|
||||
@echo no rc num ... please, run 'make rc-num.txt' before.
|
||||
else
|
||||
@echo 'Got rc num : $(rc_num)'
|
||||
endif
|
||||
|
||||
restore:
|
||||
touch project.json
|
||||
dnu restore
|
||||
|
||||
project.lock.json: project.json
|
||||
dnu restore
|
||||
|
||||
watch: project.lock.json
|
||||
ASPNET_ENV=$(ASPNET_ENV) ASPNET_LOG_LEVEL=$(ASPNET_LOG_LEVEL) dnx-watch web --configuration=$(CONFIGURATION)
|
||||
|
||||
run: project.lock.json
|
||||
ASPNET_ENV=$(ASPNET_ENV) dnx web --configuration=$(CONFIGURATION)
|
||||
|
||||
clean:
|
||||
rm -rf bin obj
|
||||
|
||||
cleanoutput:
|
||||
rm -rf bin/$(CONFIGURATION)
|
||||
rm -rf bin/output
|
||||
|
||||
$(BINTARGETPATH): project.lock.json
|
||||
dnu build --configuration=$(CONFIGURATION)
|
||||
|
||||
build: $(BINTARGETPATH)
|
||||
|
||||
bin/output:
|
||||
@dnu publish
|
||||
|
||||
bin/output/wwwroot/version: bin/output
|
||||
@git log -1 --pretty=format:%h > bin/output/wwwroot/version
|
||||
|
||||
$(PKGFILENAME): $(BINARY) rc-num.txt
|
||||
nuget pack $(PRJNAME).nuspec -Version $(VERSION) -Properties config=$(CONFIGURATION)
|
||||
|
||||
$(NUGETSOURCE)/$(PRJNAME):
|
||||
mkdir -P $^
|
||||
|
||||
deploy-pkg: $(PKGFILENAME)
|
||||
cp $(PKGFILENAME) $(NUGETSOURCE)
|
||||
|
||||
.PHONY: rc-num.txt-check
|
74
dnx.mk
74
dnx.mk
@ -1,9 +1,73 @@
|
||||
include common.mk
|
||||
# Common defs
|
||||
# assumes SOLUTIONDIR already defined
|
||||
#
|
||||
|
||||
$(BINTARGETPATH):
|
||||
dnu build
|
||||
PRJNAME := $(shell basename `pwd -P`)
|
||||
FRAMEWORK=dnx451
|
||||
ASPNET_ENV=Development
|
||||
ASPNET_LOG_LEVEL=Debug
|
||||
HOSTING=localhost
|
||||
HOSTADMIN=root
|
||||
FRAMEWORKALIAS=dnx451
|
||||
BINTARGET=$(PRJNAME).dll
|
||||
BINTARGETPATH=bin/$(CONFIGURATION)/$(FRAMEWORKALIAS)/$(BINTARGET)
|
||||
|
||||
build: project.
|
||||
$(DNU) build
|
||||
# OBS SUBDIRS=Yavsc.Server Yavsc.Abstract Yavsc cli
|
||||
#
|
||||
|
||||
# Git commit hash, in order to not publish some uncrontrolled code in production environment
|
||||
#
|
||||
|
||||
git_status := $(shell git status -s --porcelain |wc -l)
|
||||
|
||||
all: $(BINTARGETPATH)
|
||||
|
||||
rc-num.txt-check:
|
||||
ifndef rc_num
|
||||
@echo no rc num ... please, could you try and run 'make rc-num.txt' ?.
|
||||
else
|
||||
@echo 'Got rc num : $(rc_num)'
|
||||
endif
|
||||
|
||||
|
||||
restore:
|
||||
touch project.json
|
||||
dnu restore
|
||||
|
||||
project.lock.json: project.json
|
||||
dnu restore
|
||||
|
||||
watch: project.lock.json
|
||||
ASPNET_ENV=$(ASPNET_ENV) ASPNET_LOG_LEVEL=$(ASPNET_LOG_LEVEL) dnx-watch web --configuration=$(CONFIGURATION)
|
||||
|
||||
clean:
|
||||
rm -rf bin obj
|
||||
|
||||
cleanoutput:
|
||||
rm -rf bin/$(CONFIGURATION)
|
||||
rm -rf bin/output
|
||||
|
||||
$(BINTARGETPATH): project.json rc-num.txt-check
|
||||
dnu build --configuration=$(CONFIGURATION)
|
||||
|
||||
# Default target, from one level sub dirs
|
||||
|
||||
bin/output:
|
||||
@dnu publish
|
||||
|
||||
bin/output/wwwroot/version: bin/output
|
||||
@git log -1 --pretty=format:%h > bin/output/wwwroot/version
|
||||
|
||||
$(NUGETSOURCE)/$(PRJNAME)/$(PKGFILENAME): $(NUGETSOURCE)/$(PRJNAME) $(BINTARGETPATH) $(SOLUTIONDIR)/rc-num.txt
|
||||
nuget pack $(PRJNAME).nuspec -Version $(VERSION) -Properties config=$(CONFIGURATION) -OutputDirectory $(NUGETSOURCE)/$(PRJNAME)
|
||||
|
||||
$(NUGETSOURCE)/$(PRJNAME):
|
||||
mkdir -p $@
|
||||
|
||||
deploy-pkg: $(NUGETSOURCE)/$(PRJNAME)/$(PKGFILENAME)
|
||||
|
||||
.PHONY: rc-num.txt-check $(BINTARGETPATH)
|
||||
|
||||
.DEFAULT_GOAL :=
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
15
|
||||
18-alpha1
|
||||
|
13
versioning.mk
Normal file
13
versioning.mk
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
PRJNAME := $(shell basename `pwd -P`)
|
||||
SOLUTIONDIR=$(HOME)/workspace/yavsc
|
||||
rc_num := $(shell cat $(SOLUTIONDIR)/rc-num.txt)
|
||||
DESTDIR=$(SOLUTIONDIR)/build
|
||||
MAKE=make
|
||||
VERSION=1.0.5-rc$(rc_num)
|
||||
CONFIGURATION=Release
|
||||
# nuget package destination, at generation time
|
||||
NUGETSOURCE=$(HOME)/Nupkgs
|
||||
PKGFILENAME=$(PRJNAME).$(VERSION).nupkg
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"frameworks": {
|
||||
"net45+win+wpa81+MonoAndroid10+Xamarin.iOS10+MonoTouch10": {
|
||||
"wrappedProject": "../../Yavsc.Client/Yavsc.Client.csproj",
|
||||
"bin": {
|
||||
"assembly": "../../Yavsc.Client/obj/{configuration}/Yavsc.Client.dll",
|
||||
"pdb": "../../Yavsc.Client/obj/{configuration}/Yavsc.Client.pdb"
|
||||
},
|
||||
"dependencies": {
|
||||
"Json.NET.Web": "1.0.49",
|
||||
"Newtonsoft.Json": "9.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"frameworks": {
|
||||
"net45+win+wpa81+MonoAndroid10+Xamarin.iOS10+MonoTouch10": {
|
||||
"bin": {
|
||||
"assembly": "../../../../../../../Program Files (x86)/Reference Assemblies/Microsoft/Framework/MonoAndroid/v1.0/mscorlib.dll"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user