From 7438afb4bc998ea685526707095124cc5fb90ca2 Mon Sep 17 00:00:00 2001 From: Shlok Amin Date: Thu, 27 Jun 2024 11:48:50 -0400 Subject: [PATCH] feat(app-shell): add temp user license agreement to app installer closes AUTH-534 --- app-shell/Makefile | 1 + app-shell/build/license_en.txt | 1 + app-shell/electron-builder.config.js | 2 ++ app-shell/src/config/__tests__/migrate.test.ts | 4 ++-- app/Makefile | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 app-shell/build/license_en.txt diff --git a/app-shell/Makefile b/app-shell/Makefile index 88bbf74b9ad..4649be42c4c 100644 --- a/app-shell/Makefile +++ b/app-shell/Makefile @@ -97,6 +97,7 @@ clean: .PHONY: lib lib: export NODE_ENV := production lib: + echo "Building app shell JS bundle (electron layer)" vite build .PHONY: deps diff --git a/app-shell/build/license_en.txt b/app-shell/build/license_en.txt new file mode 100644 index 00000000000..99d3b3e153f --- /dev/null +++ b/app-shell/build/license_en.txt @@ -0,0 +1 @@ +we're open source yo \ No newline at end of file diff --git a/app-shell/electron-builder.config.js b/app-shell/electron-builder.config.js index aa61720338b..7e3631fd27b 100644 --- a/app-shell/electron-builder.config.js +++ b/app-shell/electron-builder.config.js @@ -75,12 +75,14 @@ module.exports = async () => ({ }, nsis: { oneClick: false, + license: 'build/license_en.txt', }, linux: { target: ['AppImage'], executableName: 'opentrons', category: 'Science', icon: project === 'robot-stack' ? 'build/icon.icns' : 'build/three.icns', + license: 'build/license_en.txt', }, publish: publishConfig, generateUpdatesFilesForAllChannels: true, diff --git a/app-shell/src/config/__tests__/migrate.test.ts b/app-shell/src/config/__tests__/migrate.test.ts index 902619dc52a..6a5dccbf165 100644 --- a/app-shell/src/config/__tests__/migrate.test.ts +++ b/app-shell/src/config/__tests__/migrate.test.ts @@ -202,8 +202,8 @@ describe('config migration', () => { expect(result).toEqual(MOCK_CONFIG_V22) }) it('should keep version 22', () => { - const v21Config = MOCK_CONFIG_V22 - const result = migrate(v21Config) + const v22Config = MOCK_CONFIG_V22 + const result = migrate(v22Config) expect(result.version).toBe(NEWEST_VERSION) expect(result).toEqual(MOCK_CONFIG_V22) diff --git a/app/Makefile b/app/Makefile index ca6c36fa726..92d0343507a 100644 --- a/app/Makefile +++ b/app/Makefile @@ -46,6 +46,7 @@ clean: .PHONY: dist dist: export NODE_ENV := production dist: + echo "Building app JS bundle (browser layer)" vite build # development