generate-all: set default of customSrc flag to vendor/state

This commit is contained in:
Dmitry Muhomor 2023-08-26 15:52:46 +03:00 committed by Daniel Micay
parent 22b2d700db
commit 2a3fba5d2e
2 changed files with 4 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import { createVendorDirs } from '../blobs/build'
import { copyBlobs } from '../blobs/copy'
import { BlobEntry } from '../blobs/entry'
import { DeviceConfig, loadDeviceConfigs } from '../config/device'
import { COLLECTED_SYSTEM_STATE_DIR } from '../config/paths'
import { forEachDevice } from '../frontend/devices'
import {
enumerateFiles,
@ -165,7 +166,7 @@ export default class GenerateFull extends Command {
customSrc: flags.string({
char: 'c',
description: 'path to AOSP build output directory (out/) or (directory containing) JSON state file',
default: 'out',
default: COLLECTED_SYSTEM_STATE_DIR,
}),
factoryPath: flags.string({
char: 'f',

View file

@ -13,6 +13,8 @@ export const ADEVTOOL_DIR = path.join(OS_CHECKOUT_DIR, 'vendor/adevtool')
export const CONFIG_DIR = process.env['ADEVTOOL_CONFIG_DIR'] ?? path.join(ADEVTOOL_DIR, 'config')
export const DEVICE_CONFIG_DIR = path.join(CONFIG_DIR, 'device')
// $DEVICE.json files made by collect-state command
export const COLLECTED_SYSTEM_STATE_DIR = process.env['ADEVTOOL_SYSTEM_STATE_DIR'] ?? path.join(OS_CHECKOUT_DIR, 'vendor/state')
export const BUILD_INDEX_DIR = path.join(CONFIG_DIR, 'build-index')
export const BUILD_INDEX_FILE = path.join(BUILD_INDEX_DIR, 'build-index.yml')