mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-27 12:26:38 +01:00
[EC-166] Move electron metadata to separate file (#1498)
* Move electron metadata to separate file * Replace yml with json * Update build script
This commit is contained in:
parent
865e92c94c
commit
241e08b7ff
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@ -532,9 +532,9 @@ jobs:
|
||||
env:
|
||||
BUILD_NUMBER: ${{ needs.setup.outputs.build_number }}
|
||||
run: |
|
||||
$package = Get-Content -Raw -Path $env:GITHUB_WORKSPACE\package.json | ConvertFrom-Json;
|
||||
$package.build | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\package.json;
|
||||
$package = Get-Content -Raw -Path $env:GITHUB_WORKSPACE\electron-builder.json | ConvertFrom-Json;
|
||||
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\electron-builder.json;
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
@ -695,9 +695,9 @@ jobs:
|
||||
env:
|
||||
BUILD_NUMBER: ${{ needs.setup.outputs.build_number }}
|
||||
run: |
|
||||
$package = Get-Content -Raw -Path $env:GITHUB_WORKSPACE\package.json | ConvertFrom-Json;
|
||||
$package.build | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\package.json;
|
||||
$package = Get-Content -Raw -Path $env:GITHUB_WORKSPACE\electron-builder.json | ConvertFrom-Json;
|
||||
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\electron-builder.json;
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
@ -901,9 +901,9 @@ jobs:
|
||||
env:
|
||||
BUILD_NUMBER: ${{ needs.setup.outputs.build_number }}
|
||||
run: |
|
||||
$package = Get-Content -Raw -Path $env:GITHUB_WORKSPACE\package.json | ConvertFrom-Json;
|
||||
$package.build | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\package.json;
|
||||
$package = Get-Content -Raw -Path $env:GITHUB_WORKSPACE\electron-builder.json | ConvertFrom-Json;
|
||||
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\electron-builder.json;
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
@ -1094,9 +1094,9 @@ jobs:
|
||||
env:
|
||||
BUILD_NUMBER: ${{ needs.setup.outputs.build_number }}
|
||||
run: |
|
||||
$package = Get-Content -Raw -Path $env:GITHUB_WORKSPACE\package.json | ConvertFrom-Json;
|
||||
$package.build | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\package.json;
|
||||
$package = Get-Content -Raw -Path $env:GITHUB_WORKSPACE\electron-builder.json | ConvertFrom-Json;
|
||||
$package | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$env:BUILD_NUMBER";
|
||||
$package | ConvertTo-Json -Depth 32 | Set-Content $env:GITHUB_WORKSPACE\electron-builder.json;
|
||||
|
||||
- name: Cache Native Module
|
||||
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09 # v3.0.2
|
||||
|
121
electron-builder.json
Normal file
121
electron-builder.json
Normal file
@ -0,0 +1,121 @@
|
||||
{
|
||||
"extraMetadata": { "name": "bitwarden" },
|
||||
"productName": "Bitwarden",
|
||||
"appId": "com.bitwarden.desktop",
|
||||
"buildDependenciesFromSource": true,
|
||||
"copyright": "Copyright © 2015-2022 Bitwarden Inc.",
|
||||
"directories": { "buildResources": "resources", "output": "dist", "app": "build" },
|
||||
"afterSign": "scripts/after-sign.js",
|
||||
"asarUnpack": ["**/*.node"],
|
||||
"files": [
|
||||
"**/*",
|
||||
"!**/node_modules/@bitwarden/desktop-native/**/*",
|
||||
"**/node_modules/@bitwarden/desktop-native/index.js",
|
||||
"**/node_modules/@bitwarden/desktop-native/dist/desktop_native.${platform}-${arch}*.node"
|
||||
],
|
||||
"mac": {
|
||||
"electronUpdaterCompatibility": ">=0.0.1",
|
||||
"category": "public.app-category.productivity",
|
||||
"darkModeSupport": true,
|
||||
"gatekeeperAssess": false,
|
||||
"hardenedRuntime": true,
|
||||
"entitlements": "resources/entitlements.mac.plist",
|
||||
"entitlementsInherit": "resources/entitlements.mac.plist",
|
||||
"extendInfo": {
|
||||
"ITSAppUsesNonExemptEncryption": false,
|
||||
"CFBundleLocalizations": [
|
||||
"en",
|
||||
"cs",
|
||||
"da",
|
||||
"de",
|
||||
"es",
|
||||
"et",
|
||||
"fi",
|
||||
"fr",
|
||||
"hr",
|
||||
"hu",
|
||||
"id",
|
||||
"it",
|
||||
"ja",
|
||||
"nb",
|
||||
"nl",
|
||||
"pl",
|
||||
"pt-BR",
|
||||
"pt-PT",
|
||||
"ro",
|
||||
"ru",
|
||||
"sk",
|
||||
"sv",
|
||||
"tr",
|
||||
"uk",
|
||||
"vi",
|
||||
"zh-Hans",
|
||||
"zh-Hant"
|
||||
],
|
||||
"CFBundleDevelopmentRegion": "en"
|
||||
},
|
||||
"target": ["dmg", "zip"]
|
||||
},
|
||||
"win": {
|
||||
"electronUpdaterCompatibility": ">=0.0.1",
|
||||
"target": ["portable", "nsis-web", "appx"],
|
||||
"sign": "./sign.js",
|
||||
"extraResources": [
|
||||
{ "from": "node_modules/regedit/vbs", "to": "regedit/vbs", "filter": ["**/*"] },
|
||||
{ "from": "resources/native-messaging.bat", "to": "native-messaging.bat" }
|
||||
]
|
||||
},
|
||||
"linux": {
|
||||
"category": "Utility",
|
||||
"synopsis": "A secure and free password manager for all of your devices.",
|
||||
"target": ["deb", "freebsd", "rpm", "AppImage", "snap"],
|
||||
"desktop": { "Name": "Bitwarden", "Type": "Application", "GenericName": "Password Manager" }
|
||||
},
|
||||
"dmg": {
|
||||
"icon": "dmg.icns",
|
||||
"contents": [
|
||||
{ "x": 150, "y": 185, "type": "file" },
|
||||
{ "x": 390, "y": 180, "type": "link", "path": "/Applications" }
|
||||
],
|
||||
"window": { "width": 540, "height": 380 }
|
||||
},
|
||||
"mas": {
|
||||
"entitlements": "resources/entitlements.mas.plist",
|
||||
"entitlementsInherit": "resources/entitlements.mas.inherit.plist",
|
||||
"hardenedRuntime": false,
|
||||
"extendInfo": { "LSMinimumSystemVersion": "10.14.0" }
|
||||
},
|
||||
"nsisWeb": {
|
||||
"oneClick": false,
|
||||
"perMachine": false,
|
||||
"allowToChangeInstallationDirectory": false,
|
||||
"artifactName": "${productName}-Installer-${version}.${ext}",
|
||||
"uninstallDisplayName": "${productName}",
|
||||
"deleteAppDataOnUninstall": true
|
||||
},
|
||||
"portable": { "artifactName": "${productName}-Portable-${version}.${ext}" },
|
||||
"appx": {
|
||||
"artifactName": "${productName}-${version}-${arch}.${ext}",
|
||||
"backgroundColor": "#175DDC",
|
||||
"applicationId": "bitwardendesktop",
|
||||
"identityName": "8bitSolutionsLLC.bitwardendesktop",
|
||||
"publisher": "CN=14D52771-DE3C-4886-B8BF-825BA7690418",
|
||||
"publisherDisplayName": "8bit Solutions LLC",
|
||||
"languages": ["en-US"]
|
||||
},
|
||||
"deb": {
|
||||
"artifactName": "${productName}-${version}-${arch}.${ext}",
|
||||
"depends": ["libnotify4", "libxtst6", "libnss3", "libsecret-1-0", "libxss1"]
|
||||
},
|
||||
"appImage": { "artifactName": "${productName}-${version}-${arch}.${ext}" },
|
||||
"rpm": { "artifactName": "${productName}-${version}-${arch}.${ext}" },
|
||||
"freebsd": { "artifactName": "${productName}-${version}-${arch}.${ext}" },
|
||||
"snap": {
|
||||
"autoStart": true,
|
||||
"confinement": "strict",
|
||||
"plugs": ["default", "password-manager-service"],
|
||||
"stagePackages": ["default"],
|
||||
"publish": ["github"]
|
||||
},
|
||||
"protocols": [{ "name": "Bitwarden", "schemes": ["bitwarden"] }]
|
||||
}
|
199
package.json
199
package.json
@ -63,205 +63,6 @@
|
||||
"prettier": "prettier --write .",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"build": {
|
||||
"extraMetadata": {
|
||||
"name": "bitwarden"
|
||||
},
|
||||
"productName": "Bitwarden",
|
||||
"appId": "com.bitwarden.desktop",
|
||||
"buildDependenciesFromSource": true,
|
||||
"copyright": "Copyright © 2015-2022 Bitwarden Inc.",
|
||||
"directories": {
|
||||
"buildResources": "resources",
|
||||
"output": "dist",
|
||||
"app": "build"
|
||||
},
|
||||
"afterSign": "scripts/after-sign.js",
|
||||
"asarUnpack": [
|
||||
"**/*.node"
|
||||
],
|
||||
"files": [
|
||||
"**/*",
|
||||
"!**/node_modules/@bitwarden/desktop-native/**/*",
|
||||
"**/node_modules/@bitwarden/desktop-native/index.js",
|
||||
"**/node_modules/@bitwarden/desktop-native/dist/desktop_native.${platform}-${arch}*.node"
|
||||
],
|
||||
"mac": {
|
||||
"electronUpdaterCompatibility": ">=0.0.1",
|
||||
"category": "public.app-category.productivity",
|
||||
"darkModeSupport": true,
|
||||
"gatekeeperAssess": false,
|
||||
"hardenedRuntime": true,
|
||||
"entitlements": "resources/entitlements.mac.plist",
|
||||
"entitlementsInherit": "resources/entitlements.mac.plist",
|
||||
"extendInfo": {
|
||||
"ITSAppUsesNonExemptEncryption": false,
|
||||
"CFBundleLocalizations": [
|
||||
"en",
|
||||
"cs",
|
||||
"da",
|
||||
"de",
|
||||
"es",
|
||||
"et",
|
||||
"fi",
|
||||
"fr",
|
||||
"hr",
|
||||
"hu",
|
||||
"id",
|
||||
"it",
|
||||
"ja",
|
||||
"nb",
|
||||
"nl",
|
||||
"pl",
|
||||
"pt-BR",
|
||||
"pt-PT",
|
||||
"ro",
|
||||
"ru",
|
||||
"sk",
|
||||
"sv",
|
||||
"tr",
|
||||
"uk",
|
||||
"vi",
|
||||
"zh-Hans",
|
||||
"zh-Hant"
|
||||
],
|
||||
"CFBundleDevelopmentRegion": "en"
|
||||
},
|
||||
"target": [
|
||||
"dmg",
|
||||
"zip"
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"electronUpdaterCompatibility": ">=0.0.1",
|
||||
"target": [
|
||||
"portable",
|
||||
"nsis-web",
|
||||
"appx"
|
||||
],
|
||||
"sign": "./sign.js",
|
||||
"extraResources": [
|
||||
{
|
||||
"from": "node_modules/regedit/vbs",
|
||||
"to": "regedit/vbs",
|
||||
"filter": [
|
||||
"**/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"from": "resources/native-messaging.bat",
|
||||
"to": "native-messaging.bat"
|
||||
}
|
||||
]
|
||||
},
|
||||
"linux": {
|
||||
"category": "Utility",
|
||||
"synopsis": "A secure and free password manager for all of your devices.",
|
||||
"target": [
|
||||
"deb",
|
||||
"freebsd",
|
||||
"rpm",
|
||||
"AppImage",
|
||||
"snap"
|
||||
],
|
||||
"desktop": {
|
||||
"Name": "Bitwarden",
|
||||
"Type": "Application",
|
||||
"GenericName": "Password Manager"
|
||||
}
|
||||
},
|
||||
"dmg": {
|
||||
"icon": "dmg.icns",
|
||||
"contents": [
|
||||
{
|
||||
"x": 150,
|
||||
"y": 185,
|
||||
"type": "file"
|
||||
},
|
||||
{
|
||||
"x": 390,
|
||||
"y": 180,
|
||||
"type": "link",
|
||||
"path": "/Applications"
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
"width": 540,
|
||||
"height": 380
|
||||
}
|
||||
},
|
||||
"mas": {
|
||||
"entitlements": "resources/entitlements.mas.plist",
|
||||
"entitlementsInherit": "resources/entitlements.mas.inherit.plist",
|
||||
"hardenedRuntime": false,
|
||||
"extendInfo": {
|
||||
"LSMinimumSystemVersion": "10.14.0"
|
||||
}
|
||||
},
|
||||
"nsisWeb": {
|
||||
"oneClick": false,
|
||||
"perMachine": false,
|
||||
"allowToChangeInstallationDirectory": false,
|
||||
"artifactName": "${productName}-Installer-${version}.${ext}",
|
||||
"uninstallDisplayName": "${productName}",
|
||||
"deleteAppDataOnUninstall": true
|
||||
},
|
||||
"portable": {
|
||||
"artifactName": "${productName}-Portable-${version}.${ext}"
|
||||
},
|
||||
"appx": {
|
||||
"artifactName": "${productName}-${version}-${arch}.${ext}",
|
||||
"backgroundColor": "#175DDC",
|
||||
"applicationId": "bitwardendesktop",
|
||||
"identityName": "8bitSolutionsLLC.bitwardendesktop",
|
||||
"publisher": "CN=14D52771-DE3C-4886-B8BF-825BA7690418",
|
||||
"publisherDisplayName": "8bit Solutions LLC",
|
||||
"languages": [
|
||||
"en-US"
|
||||
]
|
||||
},
|
||||
"deb": {
|
||||
"artifactName": "${productName}-${version}-${arch}.${ext}",
|
||||
"depends": [
|
||||
"libnotify4",
|
||||
"libxtst6",
|
||||
"libnss3",
|
||||
"libsecret-1-0",
|
||||
"libxss1"
|
||||
]
|
||||
},
|
||||
"appImage": {
|
||||
"artifactName": "${productName}-${version}-${arch}.${ext}"
|
||||
},
|
||||
"rpm": {
|
||||
"artifactName": "${productName}-${version}-${arch}.${ext}"
|
||||
},
|
||||
"freebsd": {
|
||||
"artifactName": "${productName}-${version}-${arch}.${ext}"
|
||||
},
|
||||
"snap": {
|
||||
"autoStart": true,
|
||||
"confinement": "strict",
|
||||
"plugs": [
|
||||
"default",
|
||||
"password-manager-service"
|
||||
],
|
||||
"stagePackages": [
|
||||
"default"
|
||||
],
|
||||
"publish": [
|
||||
"github"
|
||||
]
|
||||
},
|
||||
"protocols": [
|
||||
{
|
||||
"name": "Bitwarden",
|
||||
"schemes": [
|
||||
"bitwarden"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/compiler-cli": "^12.2.13",
|
||||
"@ngtools/webpack": "^12.2.13",
|
||||
|
Loading…
Reference in New Issue
Block a user