diff --git a/Dockerfile b/Dockerfile index fa7f4d4..cbfc889 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,8 @@ WORKDIR "/src/MicrosoftGraphAPIBot" RUN dotnet build "MicrosoftGraphAPIBot.csproj" -c Release -o /app/build FROM build AS publish -RUN dotnet publish "MicrosoftGraphAPIBot.csproj" -c Release -o /app/publish +ARG RELEASE_VERSION +RUN dotnet publish "MicrosoftGraphAPIBot.csproj" -c Release -o /app/publish /p:Version=$RELEASE_VERSION FROM base AS final WORKDIR /app diff --git a/MicrosoftGraphAPIBot/Telegram/TelegramAdminController.cs b/MicrosoftGraphAPIBot/Telegram/TelegramAdminController.cs index 4d03568..fe62e53 100644 --- a/MicrosoftGraphAPIBot/Telegram/TelegramAdminController.cs +++ b/MicrosoftGraphAPIBot/Telegram/TelegramAdminController.cs @@ -1,8 +1,5 @@ -using Hangfire.Storage.Monitoring; -using Microsoft.EntityFrameworkCore.Internal; -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging; using System; -using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; diff --git a/ReleaseNotes/1.1.1.0.md b/ReleaseNotes/1.1.1.0.md new file mode 100644 index 0000000..1be2cf5 --- /dev/null +++ b/ReleaseNotes/1.1.1.0.md @@ -0,0 +1,8 @@ +## 新功能: + +## 變更: + +## Bug 修復: +Docker 版本會一直提醒**Bot有新版本需要更新** [(#18)](https://github.com/NTUT-SELab/MicrosoftGraphBot/issues/18) + +## 文檔: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8012a7e..126eb6b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,6 @@ variables: buildConfiguration: 'Release' - version: '1.1.0.0' + version: '1.1.1.0' stages: - stage: Build_and_Test diff --git a/azure_templates/release_templates/docker.yml b/azure_templates/release_templates/docker.yml index 137053e..ca1590d 100644 --- a/azure_templates/release_templates/docker.yml +++ b/azure_templates/release_templates/docker.yml @@ -6,14 +6,26 @@ steps: containerRegistry: DockerHub - task: Docker@2 - displayName: Build and Push + displayName: Build inputs: - command: buildAndPush + command: build containerRegistry: DockerHub repository: ntutselab/microsoft-graph-bot tags: | $(version) latest + arguments: --build-arg RELEASE_VERSION=$(version) + +- task: Docker@2 + displayName: Push + inputs: + command: push + containerRegistry: DockerHub + repository: ntutselab/microsoft-graph-bot + tags: | + $(version) + latest + - task: Docker@2 displayName: Logout of Docker Hub inputs: diff --git a/docker-compose.yml b/docker-compose.yml index dc3274f..525c63b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,8 @@ services: volumes: - ./mssql/data:/var/opt/mssql/data - ./mssql/log:/var/opt/mssql/log +#同步容器時區 (限Linux容器) +# - /etc/localtime:/etc/localtime:ro environment: ACCEPT_EULA: Y SA_PASSWORD: P@ssw0rd @@ -17,6 +19,8 @@ services: volumes: - ./bot/appsettings.json:/app/appsettings.json - ./bot/Logs:/app/Logs +#同步容器時區 (限Linux容器) +# - /etc/localtime:/etc/localtime:ro restart: always container_name: MGBot depends_on: