Merge pull request #4 from H2-invent/development

[MINOR] Add Version to bot command in config JS
This commit is contained in:
holema 2023-11-29 12:23:43 +01:00 committed by GitHub
commit eaf1466326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View file

@ -41,6 +41,14 @@ jobs:
- run: unzip -qq artifact_${{github.run_number}}.zip -d artifact
- name: Write semantic Version in config file
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "<version-addhere>"
replace: "{{ steps.version.outputs.version }}"
regex: false
include: "artifact/config.mjs"
- name: Archive Release for application
uses: thedoctor0/zip-release@0.7.1
with:

View file

@ -1,5 +1,5 @@
import {md5} from "js-md5";
import {JITSI_ADMIN_URL} from "./config.mjs";
import {BOT_VERSION, JITSI_ADMIN_URL} from "./config.mjs";
import gitRepoInfo from 'git-repo-info';
export class conferenceUtils {
@ -67,7 +67,7 @@ export class conferenceUtils {
async getVersion(roomId) {
const repoInfo = gitRepoInfo();
this.client.sendText(roomId, 'Version: '+repoInfo.tag);
this.client.sendText(roomId, 'Version: '+BOT_VERSION);
}
}

View file

@ -3,4 +3,5 @@ export var MATRIX_URL=process.env.MATRIX_URL || "https://matrix.org";
export var JITSI_ADMIN_URL =process.env.JITSI_ADMIN_URL || 'https://jitsi-admin.de';
export var MATRIX_USERNAME =process.env.MATRIX_USERNAME || 'h2inventbot';
export var MATRIX_PASSWORD =process.env.MATRIX_PASSWORD || 'xxxxxxxx';
export var MATRIX_DISPLAYNAME =process.env.MATRIX_DISPLAYNAME || 'Raumassistent';
export var MATRIX_DISPLAYNAME =process.env.MATRIX_DISPLAYNAME || 'Raumassistent';
export var BOT_VERSION =process.env.BOT_VERSION || '<version-addhere>';