Log ESP Web Tools version (#328)

* Log ESP Web Tools version

* Prettier on generated code
This commit is contained in:
Paulus Schoutsen 2023-02-02 22:37:56 -05:00 committed by GitHub
parent 652537eff1
commit 38e1398e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 0 deletions

View File

@ -15,6 +15,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install jq tool
run: |
sudo apt-get update
sudo apt-get install jq
- name: Use Node.js
uses: actions/setup-node@v3
with:

View File

@ -12,6 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install jq tool
run: |
sudo apt-get update
sudo apt-get install jq
- uses: actions/setup-node@v3
with:
node-version: 16

View File

@ -2,6 +2,7 @@
set -e
cd "$(dirname "$0")/.."
echo 'export const version =' `jq .version package.json`";" > src/version.ts
rm -rf dist
NODE_ENV=production npm exec -- tsc

View File

@ -31,6 +31,11 @@ import { fireEvent } from "./util/fire-event";
import { sleep } from "./util/sleep";
import { downloadManifest } from "./util/manifest";
import { dialogStyles } from "./styles";
import { version } from "./version";
console.log(
`ESP Web Tools ${version} by Nabu Casa; https://esphome.github.io/esp-web-tools/`
);
const ERROR_ICON = "⚠️";
const OK_ICON = "🎉";

1
src/version.ts Normal file
View File

@ -0,0 +1 @@
export const version = "dev";