mirror of
https://github.com/lineageos4microg/docker-lineage-cicd
synced 2024-11-09 10:09:56 +01:00
Move BUILD file generation out of key generation loop
Fix indentation
This commit is contained in:
parent
fcbd813cb1
commit
7fc4f1cc40
47
src/init.sh
47
src/init.sh
@ -34,30 +34,13 @@ fi
|
||||
git config --global user.name "$USER_NAME"
|
||||
git config --global user.email "$USER_MAIL"
|
||||
|
||||
if [ "$SIGN_BUILDS" = true ]; then
|
||||
for c in bluetooth cyngn-app media networkstack nfc platform releasekey sdk_sandbox shared testcert testkey verity ; do
|
||||
if [ ! -f "$KEYS_DIR/$c.pk8" ]; then
|
||||
echo ">> [$(date)] Generating $c..."
|
||||
/root/make_key "$KEYS_DIR/$c" "$KEYS_SUBJECT" <<< '' &> /dev/null
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Android 14 requires to set a BUILD file for bazel to avoid errors:
|
||||
cat > "$KEYS_DIR"/BUILD << _EOB
|
||||
# adding an empty BUILD file fixes the A14 build error:
|
||||
# "ERROR: no such package 'keys': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package."
|
||||
# adding the filegroup "android_certificate_directory" fixes the A14 build error:
|
||||
# "no such target '//keys:android_certificate_directory': target 'android_certificate_directory' not declared in package 'keys'"
|
||||
filegroup(
|
||||
name = "android_certificate_directory",
|
||||
srcs = glob([
|
||||
"*.pk8",
|
||||
"*.pem",
|
||||
]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
_EOB
|
||||
if [ "$SIGN_BUILDS" = true ]; then
|
||||
for c in bluetooth cyngn-app media networkstack nfc platform releasekey sdk_sandbox shared testcert testkey verity ; do
|
||||
if [ ! -f "$KEYS_DIR/$c.pk8" ]; then
|
||||
echo ">> [$(date)] Generating $c..."
|
||||
/root/make_key "$KEYS_DIR/$c" "$KEYS_SUBJECT" <<< '' &> /dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
for c in cyngn{-priv,}-app testkey; do
|
||||
for e in pk8 x509.pem; do
|
||||
@ -66,6 +49,22 @@ _EOB
|
||||
done
|
||||
fi
|
||||
|
||||
# Android 14 requires to set a BUILD file for bazel to avoid errors:
|
||||
cat > "$KEYS_DIR"/BUILD << _EOB
|
||||
# adding an empty BUILD file fixes the A14 build error:
|
||||
# "ERROR: no such package 'keys': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package."
|
||||
# adding the filegroup "android_certificate_directory" fixes the A14 build error:
|
||||
# "no such target '//keys:android_certificate_directory': target 'android_certificate_directory' not declared in package 'keys'"
|
||||
filegroup(
|
||||
name = "android_certificate_directory",
|
||||
srcs = glob([
|
||||
"*.pk8",
|
||||
"*.pem",
|
||||
]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
_EOB
|
||||
|
||||
if [ "$CRONTAB_TIME" = "now" ]; then
|
||||
/root/build.sh
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user