Skip to content

Commit

Permalink
Log ESP Web Tools version (#328)
Browse files Browse the repository at this point in the history
* Log ESP Web Tools version

* Prettier on generated code
  • Loading branch information
balloob authored Feb 3, 2023
1 parent 652537e commit 38e1398
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions script/build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/install-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "🎉";
Expand Down
1 change: 1 addition & 0 deletions src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const version = "dev";

0 comments on commit 38e1398

Please sign in to comment.