fix: strip branded binaries (#36641)

When creating branded release builds and using scripts/strip-binaries.py
on Linux, the final artifacts end up unstripped due to the static set of
binaries considered for stripping.
With this patch the name of the electron binary is taken from the
BRANDING.json `project_name` key.

Signed-off-by: Robert Günzler <r@gnzler.io>

Signed-off-by: Robert Günzler <r@gnzler.io>
This commit is contained in:
Robert Günzler 2022-12-13 23:01:20 +01:00 committed by GitHub
parent 425f1ffa98
commit ab890fb8c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 19 deletions

View file

@ -4,11 +4,11 @@ import argparse
import os
import sys
from lib.config import LINUX_BINARIES, enable_verbose_mode
from lib.util import execute, get_out_dir
from lib.config import enable_verbose_mode
from lib.util import execute, get_linux_binaries, get_out_dir
def strip_binaries(directory, target_cpu):
for binary in LINUX_BINARIES:
for binary in get_linux_binaries():
binary_path = os.path.join(directory, binary)
if os.path.isfile(binary_path):
strip_binary(binary_path, target_cpu)