Skip to content

Commit

Permalink
1.1.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
karamem0 committed Jun 3, 2023
1 parent 0406b27 commit 677d515
Show file tree
Hide file tree
Showing 15 changed files with 59 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- develop

env:
BUILD_VERSION: 1.1.2.${{github.run_number}}
BUILD_VERSION: 1.1.3.${{github.run_number}}
BUILD_CONFIGURATION: Release

jobs:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- v*.*.*

env:
BUILD_VERSION: 1.1.2.${{github.run_number}}
BUILD_VERSION: 1.1.3.${{github.run_number}}
BUILD_CONFIGURATION: Release

jobs:
Expand Down Expand Up @@ -69,6 +69,7 @@ jobs:
path: manifest
deploy:
needs: build
if: contains(github.ref, 'refs/heads/main')
environment: production
runs-on: windows-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion manifest/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"manifestVersion": "1.16",
"version": "1.1.2",
"version": "1.1.3",
"id": "{{AppId}}",
"packageName": "dev.karamem0.commistant",
"name": {
Expand Down
4 changes: 2 additions & 2 deletions source/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "commistant",
"private": true,
"version": "1.1.1",
"version": "1.1.3",
"scripts": {
"start": "tsc && vite",
"build": "tsc && vite build"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Karamem0.Commistant.Logging;
using Karamem0.Commistant.Models;
using Karamem0.Commistant.Services;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Connector;
using Microsoft.Bot.Schema;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Karamem0.Commistant.Logging;
using Karamem0.Commistant.Models;
using Karamem0.Commistant.Services;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Connector;
using Microsoft.Bot.Schema;
using Microsoft.Extensions.Logging;
Expand Down
36 changes: 17 additions & 19 deletions source/server/Karamem0.Commistant.Functions/ConfigureServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// https://github.com/karamem0/commistant/blob/main/LICENSE
//

using Azure.Identity;
using Azure.Storage.Blobs;
using Karamem0.Commistant.Commands;
using Karamem0.Commistant.Commands.Abstraction;
Expand All @@ -27,33 +28,30 @@ public static class ConfigureServices

public static IServiceCollection AddBlobContainerClient(this IServiceCollection services, IConfiguration configuration)
{
return services
.AddSingleton(provider => new BlobServiceClient(
configuration.GetValue<string>("AzureBlobStogageConnectionString")))
.AddSingleton(provider => provider
.GetService<BlobServiceClient>()?
.GetBlobContainerClient(configuration.GetValue<string>("AzureBlobStogageContainerName"))
?? throw new InvalidOperationException());
var blobContainerUrl = configuration.GetValue<string>("AzureBlobStogageContainerUrl") ?? throw new InvalidOperationException();
_ = services.AddSingleton(provider => new BlobContainerClient(new Uri(blobContainerUrl), new DefaultAzureCredential()));
return services;
}

public static IServiceCollection AddCommands(this IServiceCollection services, IConfiguration configuration)
{
return services
.AddSingleton<ServiceClientCredentials>(new MicrosoftAppCredentials(
configuration.GetValue<string>("MicrosoftAppId"),
configuration.GetValue<string>("MicrosoftAppPassword")))
.AddSingleton<StartMeetingCommand>()
.AddSingleton<EndMeetingCommand>()
.AddSingleton<InMeetingCommand>()
.AddSingleton((provider) => new CommandSet()
.Add(provider.GetService<StartMeetingCommand>())
.Add(provider.GetService<EndMeetingCommand>())
.Add(provider.GetService<InMeetingCommand>()));
_ = services.AddSingleton<ServiceClientCredentials>(new MicrosoftAppCredentials(
configuration.GetValue<string>("MicrosoftAppId"),
configuration.GetValue<string>("MicrosoftAppPassword")));
_ = services.AddSingleton<StartMeetingCommand>();
_ = services.AddSingleton<EndMeetingCommand>();
_ = services.AddSingleton<InMeetingCommand>();
_ = services.AddSingleton((provider) => new CommandSet()
.Add(provider.GetService<StartMeetingCommand>())
.Add(provider.GetService<EndMeetingCommand>())
.Add(provider.GetService<InMeetingCommand>()));
return services;
}

public static IServiceCollection AddServices(this IServiceCollection services)
{
return services.AddTransient<QrCodeService>();
_ = services.AddTransient<QrCodeService>();
return services;
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Karamem0.Commistant.Commands.Abstraction;
using Karamem0.Commistant.Logging;
using Karamem0.Commistant.Models;
using Microsoft.ApplicationInsights;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Bot.Schema;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.9.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.16.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.21.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.14.1" />
Expand Down
3 changes: 1 addition & 2 deletions source/server/Karamem0.Commistant.Functions/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
},
"MicrosoftAppId": "",
"MicrosoftAppPassword": "",
"AzureBlobStogageConnectionString": "",
"AzureBlobStogageContainerName": ""
"AzureBlobStogageContainerUrl": ""
}
46 changes: 25 additions & 21 deletions source/server/Karamem0.Commistant.Web/ConfigureServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// https://github.com/karamem0/commistant/blob/main/LICENSE
//

using Azure.Identity;
using Azure.Storage;
using Karamem0.Commistant.Adapters;
using Karamem0.Commistant.Dialogs;
using Karamem0.Commistant.Webs;
Expand All @@ -29,31 +31,33 @@ public static class ConfigureServices

public static IServiceCollection AddBots(this IServiceCollection services, IConfiguration configuration)
{
return services
.AddSingleton<BotFrameworkAuthentication, ConfigurationBotFrameworkAuthentication>()
.AddSingleton<IBotFrameworkHttpAdapter, AdapterWithErrorHandler>()
// .AddSingleton<IStorage>(new MemoryStorage())
.AddSingleton<IStorage>(new BlobsStorage(
configuration.GetValue<string>("AzureBlobStogageConnectionString"),
configuration.GetValue<string>("AzureBlobStogageContainerName")))
.AddSingleton<ConversationState>()
.AddScoped<IBot, ActivityBot>();
var blobContainerUrl = configuration.GetValue<string>("AzureBlobStogageContainerUrl") ?? throw new InvalidOperationException();
_ = services.AddSingleton<BotFrameworkAuthentication, ConfigurationBotFrameworkAuthentication>();
_ = services.AddSingleton<IBotFrameworkHttpAdapter, AdapterWithErrorHandler>();
// _ = services.AddSingleton<IStorage>(new MemoryStorage());
_ = services.AddSingleton<IStorage>(new BlobsStorage(
new Uri(blobContainerUrl),
new DefaultAzureCredential(),
new StorageTransferOptions()));
_ = services.AddSingleton<ConversationState>();
_ = services.AddScoped<IBot, ActivityBot>();
return services;
}

public static IServiceCollection AddDialogs(this IServiceCollection services)
{
return services
.AddScoped<StartMeetingDialog>()
.AddScoped<EndMeetingDialog>()
.AddScoped<InMeetingDialog>()
.AddScoped<ResetDialog>()
.AddScoped(provider => new DialogSet(provider
.GetService<ConversationState>()?
.CreateProperty<DialogState>(nameof(DialogState)))
.Add(provider.GetService<StartMeetingDialog>())
.Add(provider.GetService<EndMeetingDialog>())
.Add(provider.GetService<InMeetingDialog>())
.Add(provider.GetService<ResetDialog>()));
_ = services.AddScoped<StartMeetingDialog>();
_ = services.AddScoped<EndMeetingDialog>();
_ = services.AddScoped<InMeetingDialog>();
_ = services.AddScoped<ResetDialog>();
_ = services.AddScoped(provider => new DialogSet(provider
.GetService<ConversationState>()?
.CreateProperty<DialogState>(nameof(DialogState)))
.Add(provider.GetService<StartMeetingDialog>())
.Add(provider.GetService<EndMeetingDialog>())
.Add(provider.GetService<InMeetingDialog>())
.Add(provider.GetService<ResetDialog>()));
return services;
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<ItemGroup>
<PackageReference Include="AdaptiveCards" Version="3.0.0" />
<PackageReference Include="Azure.Identity" Version="1.9.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.5" />
<PackageReference Include="Microsoft.Bot.Builder.Azure.Blobs" Version="4.20.0" />
Expand Down
11 changes: 6 additions & 5 deletions source/server/Karamem0.Commistant.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// https://github.com/karamem0/commistant/blob/main/LICENSE
//

#pragma warning disable CA1852

using Karamem0.Commistant;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
Expand Down Expand Up @@ -39,10 +41,9 @@
_ = app.UseWebSockets();
_ = app.UseRouting();
_ = app.UseAuthorization();
_ = app.UseEndpoints(endpoints =>
{
_ = endpoints.MapControllers();
_ = endpoints.MapFallbackToFile("/index.html");
});
_ = app.MapControllers();
_ = app.MapFallbackToFile("/index.html");

app.Run();

#pragma warning restore CA1852
3 changes: 1 addition & 2 deletions source/server/Karamem0.Commistant.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
"MicrosoftAppId": "",
"MicrosoftAppPassword": "",
"MicrosoftAppTenantId": "",
"AzureBlobStogageConnectionString": "",
"AzureBlobStogageContainerName": ""
"AzureBlobStogageContainerUrl": ""
}

0 comments on commit 677d515

Please sign in to comment.