diff --git a/Dockerfile b/Dockerfile index 5959070..9b81b9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,4 +37,6 @@ RUN chmod +x /root/sandbox.sh EXPOSE 5050/tcp +ENV JUDGER_VERSION=$(git describe --tags --always --dirty) + ENTRYPOINT [ "/root/entrypoint.sh" ] diff --git a/sojj/Services/JudgeService.cs b/sojj/Services/JudgeService.cs index 168f9fd..0014a23 100644 --- a/sojj/Services/JudgeService.cs +++ b/sojj/Services/JudgeService.cs @@ -46,7 +46,7 @@ public async Task CheckinAsync() var formdata = new MultipartFormDataContent{ {new StringContent(Environment.MachineName), "name"}, {new StringContent(this.configuration.GetValue("NumberOfWorkers", Environment.ProcessorCount).ToString()), "concurrency"}, - {new StringContent(this.configuration.GetValue("Version", "default")), "version"}, + {new StringContent(this.configuration.GetValue("JUDGER_VERSION", "default")), "version"}, }; var response = await httpClient.PostAsync("/judge/checkin", formdata); if (response.IsSuccessStatusCode)