Skip to content

Commit

Permalink
Release 1.1.1.0
Browse files Browse the repository at this point in the history
修正 Docker 版本會一直提醒:Bot有新版本需要更新

bug: #18
  • Loading branch information
ChengYen-Tang committed Oct 9, 2020
1 parent c603570 commit 0085d05
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions MicrosoftGraphAPIBot/Telegram/TelegramAdminController.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
8 changes: 8 additions & 0 deletions ReleaseNotes/1.1.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## 新功能:

## 變更:

## Bug 修復:
Docker 版本會一直提醒**Bot有新版本需要更新** [(#18)](https://github.com/NTUT-SELab/MicrosoftGraphBot/issues/18)

## 文檔:
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
buildConfiguration: 'Release'
version: '1.1.0.0'
version: '1.1.1.0'

stages:
- stage: Build_and_Test
Expand Down
16 changes: 14 additions & 2 deletions azure_templates/release_templates/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 0085d05

Please sign in to comment.