mirror of
https://github.com/balena-io/etcher.git
synced 2025-11-09 18:38:32 +00:00
Compare commits
8 Commits
v1.13.2
...
aethernet/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec7e0b745e | ||
|
|
d5ba1ea5e1 | ||
|
|
54d3636a22 | ||
|
|
45f6ee667d | ||
|
|
d25eda9a7d | ||
|
|
7420283249 | ||
|
|
453952440f | ||
|
|
2475d576c7 |
15
.github/actions/publish/action.yml
vendored
15
.github/actions/publish/action.yml
vendored
@@ -72,10 +72,7 @@ runs:
|
||||
chmod +x "$(dirname "$(which node)")/resinci-deploy" && which resinci-deploy
|
||||
fi
|
||||
|
||||
# FIXME: store sentry workflow is not documented
|
||||
# https://github.com/product-os/resinci-deploy/blob/master/lib/sentry.ts
|
||||
# https://github.com/getsentry/sentry-cli
|
||||
# https://docs.sentry.io/api/projects/create-a-new-client-key/
|
||||
# Upload sourcemaps to sentry
|
||||
- name: Generate Sentry DSN
|
||||
id: sentry
|
||||
shell: bash --noprofile --norc -eo pipefail -x {0}
|
||||
@@ -206,6 +203,16 @@ runs:
|
||||
-name "latest*.yml" \
|
||||
-exec yq -i e .stagingPercentage=\"$percentage\" {} \;
|
||||
|
||||
- name: Upload sourcemap to Sentry
|
||||
shell: bash --noprofile --norc -eo pipefail -x {0}
|
||||
run: |
|
||||
VERSION=${{ steps.package_release.outputs.version }} npm run uploadSourcemap
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ fromJSON(inputs.secrets).SENTRY_AUTH_TOKEN }}
|
||||
npm_config_SENTRY_ORG: balenaEtcher
|
||||
npm_config_SENTRY_PROJECT: balenaetcher
|
||||
npm_config_SENTRY_VERSION: ${{ steps.package_release.outputs.version }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
- commits:
|
||||
- subject: Adding EtcherPro device serial number to the Settings modal
|
||||
hash: d25eda9a7d6bf89284b630b2d55cbb0a7e3a9432
|
||||
body: ""
|
||||
footer:
|
||||
Change-type: patch
|
||||
change-type: patch
|
||||
author: Aurelien VALADE
|
||||
nested: []
|
||||
version: 1.13.4
|
||||
title: ""
|
||||
date: 2023-01-12T15:10:50.328Z
|
||||
- commits:
|
||||
- subject: "patch: progress cm4 to second stage"
|
||||
hash: 2475d576c7d9ecb46507c47c4143bdbfbdb44e45
|
||||
body: ""
|
||||
footer: {}
|
||||
author: Peter Makra
|
||||
nested: []
|
||||
version: 1.13.3
|
||||
title: ""
|
||||
date: 2023-01-11T14:30:45.116Z
|
||||
- commits:
|
||||
- subject: "patch: fixed winget parameter name"
|
||||
hash: 33fe4b2c1abcb7f71f42a4b682f174422cb72a00
|
||||
|
||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -3,6 +3,16 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
# v1.13.4
|
||||
## (2023-01-12)
|
||||
|
||||
* Adding EtcherPro device serial number to the Settings modal [Aurelien VALADE]
|
||||
|
||||
# v1.13.3
|
||||
## (2023-01-11)
|
||||
|
||||
* patch: progress cm4 to second stage [Peter Makra]
|
||||
|
||||
# v1.13.2
|
||||
## (2023-01-02)
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import * as analytics from '../../modules/analytics';
|
||||
import { open as openExternal } from '../../os/open-external/services/open-external';
|
||||
import { Modal } from '../../styled-components';
|
||||
import * as i18next from 'i18next';
|
||||
import { etcherProInfo } from '../../utils/etcher-pro-specific';
|
||||
|
||||
interface Setting {
|
||||
name: string;
|
||||
@@ -55,7 +56,7 @@ interface SettingsModalProps {
|
||||
toggleModal: (value: boolean) => void;
|
||||
}
|
||||
|
||||
const UUID = process.env.BALENA_DEVICE_UUID;
|
||||
const EPInfo = etcherProInfo();
|
||||
|
||||
const InfoBox = (props: any) => (
|
||||
<Box fontSize={14}>
|
||||
@@ -117,10 +118,14 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) {
|
||||
</Flex>
|
||||
);
|
||||
})}
|
||||
{UUID !== undefined && (
|
||||
{EPInfo !== undefined && (
|
||||
<Flex flexDirection="column">
|
||||
<Txt fontSize={24}>{i18next.t('settings.systemInformation')}</Txt>
|
||||
<InfoBox label="UUID" value={UUID.substr(0, 7)} />
|
||||
{EPInfo.get_serial() === undefined ? (
|
||||
<InfoBox label="UUID" value={EPInfo.uuid} />
|
||||
) : (
|
||||
<InfoBox label="Serial" value={EPInfo.get_serial()} />
|
||||
)}
|
||||
</Flex>
|
||||
)}
|
||||
<Flex
|
||||
|
||||
73
lib/gui/app/utils/etcher-pro-specific.ts
Normal file
73
lib/gui/app/utils/etcher-pro-specific.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2022 balena.io
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Dictionary } from 'lodash';
|
||||
|
||||
type BalenaTag = {
|
||||
id: number,
|
||||
name: string,
|
||||
value: string
|
||||
}
|
||||
|
||||
export class EtcherPro {
|
||||
private supervisorAddr: string;
|
||||
private supervisorKey: string;
|
||||
private tags: Dictionary<string> | undefined;
|
||||
public uuid: string;
|
||||
|
||||
constructor(supervisorAddr: string, supervisorKey: string) {
|
||||
this.supervisorAddr = supervisorAddr;
|
||||
this.supervisorKey = supervisorKey;
|
||||
this.uuid = (process.env.BALENA_DEVICE_UUID ?? 'NO-UUID').substring(0, 7);
|
||||
this.tags = undefined;
|
||||
this.get_tags().then((tags) => (this.tags = tags));
|
||||
}
|
||||
|
||||
async get_tags(): Promise<Dictionary<string>> {
|
||||
const result = await fetch(
|
||||
this.supervisorAddr + '/v2/device/tags?apikey=' + this.supervisorKey,
|
||||
);
|
||||
const parsed = await result.json();
|
||||
if (parsed['status'] === 'success') {
|
||||
return Object.assign(
|
||||
{},
|
||||
...parsed['tags'].map((tag: BalenaTag) => {
|
||||
return { [tag.name]: tag.value };
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
public get_serial(): string | undefined {
|
||||
if (this.tags) {
|
||||
return this.tags['Serial'];
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function etcherProInfo(): EtcherPro | undefined {
|
||||
const BALENA_SUPERVISOR_ADDRESS = process.env.BALENA_SUPERVISOR_ADDRESS;
|
||||
const BALENA_SUPERVISOR_API_KEY = process.env.BALENA_SUPERVISOR_API_KEY;
|
||||
|
||||
if (BALENA_SUPERVISOR_ADDRESS && BALENA_SUPERVISOR_API_KEY) {
|
||||
return new EtcherPro(BALENA_SUPERVISOR_ADDRESS, BALENA_SUPERVISOR_API_KEY);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
399
package-lock.json
generated
399
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
"name": "balena-etcher",
|
||||
"private": true,
|
||||
"displayName": "balenaEtcher",
|
||||
"version": "1.13.2",
|
||||
"version": "1.13.4",
|
||||
"packageType": "local",
|
||||
"main": "generated/etcher.js",
|
||||
"description": "Flash OS images to SD cards and USB drives, safely and easily.",
|
||||
@@ -31,6 +31,7 @@
|
||||
"test-spectron": "mocha --recursive --reporter spec --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts tests/spectron/runner.spec.ts",
|
||||
"test-windows": "npm run lint && npm run test-gui && npm run test-shared && npm run test-spectron && npm run sanity-checks",
|
||||
"test": "echo npm run test-{linux,windows,macos}",
|
||||
"uploadSourcemap": "sentry-cli releases files $npm_config_SENTRY_VERSION upload-sourcemaps ./generated/*.js.map --org $npm_config_SENTRY_ORG --project $npm_config_SENTRY_PROJECT",
|
||||
"watch": "webpack serve --no-optimization-minimize --config ./webpack.dev.config.ts",
|
||||
"webpack": "webpack"
|
||||
},
|
||||
@@ -53,6 +54,7 @@
|
||||
"@balena/lint": "5.4.2",
|
||||
"@balena/sudo-prompt": "9.2.1-workaround-windows-amperstand-in-username-0849e215b947987a643fe5763902aea201255534",
|
||||
"@fortawesome/fontawesome-free": "5.15.4",
|
||||
"@sentry/cli": "^2.11.0",
|
||||
"@svgr/webpack": "5.5.0",
|
||||
"@types/chai": "4.3.4",
|
||||
"@types/copy-webpack-plugin": "6.4.3",
|
||||
@@ -81,7 +83,7 @@
|
||||
"electron-rebuild": "3.2.9",
|
||||
"electron-updater": "5.3.0",
|
||||
"esbuild-loader": "2.20.0",
|
||||
"etcher-sdk": "^7.4.6",
|
||||
"etcher-sdk": "^7.4.7",
|
||||
"file-loader": "6.2.0",
|
||||
"husky": "4.3.8",
|
||||
"i18next": "21.10.0",
|
||||
@@ -126,6 +128,6 @@
|
||||
"node": ">=14 < 16"
|
||||
},
|
||||
"versionist": {
|
||||
"publishedAt": "2023-01-02T20:55:58.804Z"
|
||||
"publishedAt": "2023-01-12T15:10:50.986Z"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -455,6 +455,7 @@ const guiConfig = {
|
||||
const mainConfig = {
|
||||
...commonConfig,
|
||||
target: 'electron-main',
|
||||
devtool: 'source-map',
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: true,
|
||||
|
||||
Reference in New Issue
Block a user