Fix nightly summary

This commit is contained in:
Michael Telatynski 2023-05-09 10:35:54 +01:00
parent 19a4778da7
commit 3ed6a1591d
No known key found for this signature in database
GPG key ID: A2B008A5F49F5D0D
2 changed files with 26 additions and 2 deletions

View file

@ -117,6 +117,7 @@ jobs:
- name: "[Nightly] Write summary"
if: inputs.nightly
run: |
WEBAPP_VERSION=$(./scripts/get-version.ts)
WEB_VERSION=${WEBAPP_VERSION:0:12}
REACT_VERSION=${WEBAPP_VERSION:19:12}
JS_VERSION=${WEBAPP_VERSION:35:12}
@ -132,8 +133,6 @@ jobs:
echo "| Element Web | [$WEB_VERSION](https://github.com/vector-im/element-web/commit/$WEB_VERSION) |" >> $GITHUB_STEP_SUMMARY
echo "| React SDK | [$REACT_VERSION](https://github.com/matrix-org/matrix-react-sdk/commit/$REACT_VERSION) |" >> $GITHUB_STEP_SUMMARY
echo "| JS SDK | [$JS_VERSION](https://github.com/matrix-org/matrix-js-sdk/commit/$JS_VERSION) |" >> $GITHUB_STEP_SUMMARY
env:
WEBAPP_VERSION: ${{ steps.package.outputs.version }}
- uses: actions/upload-artifact@v3
with:

25
scripts/get-version.ts Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env -S npx ts-node
/*
* Checks for the presence of a webapp, inspects its version and prints it
*/
import { versionFromAsar } from "./set-version";
async function main(): Promise<number> {
const version = await versionFromAsar();
console.log(version);
return 0;
}
if (require.main === module) {
main()
.then((ret) => {
process.exit(ret);
})
.catch((e) => {
console.error(e);
process.exit(1);
});
}