mirror of https://github.com/1okko/openpilot.git
casync build: remove channel from build metadata json (#32212)
* remove channel * fix * reset * remove this * no channel
This commit is contained in:
parent
c309333b79
commit
cedf98de5a
|
@ -32,7 +32,6 @@
|
|||
# of a tarball containing the full prebuilt openpilot release
|
||||
BUILD_DIR=/data/openpilot_build \
|
||||
CASYNC_DIR=/data/casync \
|
||||
OPENPILOT_CHANNEL=nightly \
|
||||
release/create_casync_build.sh
|
||||
```
|
||||
|
||||
|
|
|
@ -20,4 +20,4 @@ release/copy_build_files.sh $SOURCE_DIR $BUILD_DIR
|
|||
release/create_prebuilt.sh $BUILD_DIR
|
||||
|
||||
cd $SOURCE_DIR
|
||||
release/create_casync_release.py $BUILD_DIR $CASYNC_DIR $OPENPILOT_CHANNEL
|
||||
release/create_casync_release.py $BUILD_DIR $CASYNC_DIR
|
||||
|
|
|
@ -12,7 +12,6 @@ if __name__ == "__main__":
|
|||
parser = argparse.ArgumentParser(description="creates a casync release")
|
||||
parser.add_argument("target_dir", type=str, help="target directory to build channel from")
|
||||
parser.add_argument("output_dir", type=str, help="output directory for the channel")
|
||||
parser.add_argument("channel", type=str, help="what channel this build is")
|
||||
args = parser.parse_args()
|
||||
|
||||
target_dir = pathlib.Path(args.target_dir)
|
||||
|
@ -21,7 +20,7 @@ if __name__ == "__main__":
|
|||
build_metadata = get_build_metadata()
|
||||
build_metadata.openpilot.build_style = "release" if os.environ.get("RELEASE", None) is not None else "debug"
|
||||
|
||||
create_build_metadata_file(target_dir, build_metadata, args.channel)
|
||||
create_build_metadata_file(target_dir, build_metadata)
|
||||
|
||||
digest, caibx = create_casync_release(target_dir, output_dir, build_metadata.canonical)
|
||||
|
||||
|
|
|
@ -6,18 +6,16 @@ import os
|
|||
import pathlib
|
||||
|
||||
from openpilot.system.hardware.tici.agnos import AGNOS_MANIFEST_FILE, get_partition_path
|
||||
from openpilot.system.version import get_build_metadata, get_agnos_version
|
||||
from openpilot.system.version import get_build_metadata
|
||||
|
||||
|
||||
BASE_URL = "https://commadist.blob.core.windows.net"
|
||||
|
||||
CHANNEL_DATA = pathlib.Path(__file__).parent / "channel_data" / "agnos"
|
||||
|
||||
OPENPILOT_RELEASES = f"{BASE_URL}/openpilot-releases/openpilot"
|
||||
AGNOS_RELEASES = f"{BASE_URL}/openpilot-releases/agnos"
|
||||
|
||||
|
||||
def create_partition_manifest(agnos_version, partition):
|
||||
def create_partition_manifest(partition):
|
||||
agnos_filename = os.path.basename(partition["url"]).split(".")[0]
|
||||
|
||||
return {
|
||||
|
@ -57,7 +55,7 @@ if __name__ == "__main__":
|
|||
ret = {
|
||||
"build_metadata": dataclasses.asdict(build_metadata),
|
||||
"manifest": [
|
||||
*[create_partition_manifest(get_agnos_version(args.target_dir), entry) for entry in agnos_manifest],
|
||||
*[create_partition_manifest(entry) for entry in agnos_manifest],
|
||||
create_openpilot_manifest(build_metadata)
|
||||
]
|
||||
}
|
||||
|
|
|
@ -29,11 +29,11 @@ def get_exclude_set(path) -> set[str]:
|
|||
return exclude_set
|
||||
|
||||
|
||||
def create_build_metadata_file(path: pathlib.Path, build_metadata: BuildMetadata, channel: str):
|
||||
def create_build_metadata_file(path: pathlib.Path, build_metadata: BuildMetadata):
|
||||
with open(path / BUILD_METADATA_FILENAME, "w") as f:
|
||||
build_metadata_dict = dataclasses.asdict(build_metadata)
|
||||
build_metadata_dict["channel"] = channel
|
||||
build_metadata_dict["openpilot"].pop("is_dirty") # this is determined at runtime
|
||||
build_metadata_dict.pop("channel") # channel is unrelated to the build itself
|
||||
f.write(json.dumps(build_metadata_dict))
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ from openpilot.common.basedir import BASEDIR
|
|||
from openpilot.common.swaglog import cloudlog
|
||||
from openpilot.common.utils import cache
|
||||
from openpilot.common.git import get_commit, get_origin, get_branch, get_short_branch, get_commit_date
|
||||
from openpilot.common.run import run_cmd
|
||||
|
||||
RELEASE_BRANCHES = ['release3-staging', 'release3', 'nightly']
|
||||
TESTED_BRANCHES = RELEASE_BRANCHES + ['devel', 'devel-staging']
|
||||
|
@ -157,11 +156,6 @@ def get_build_metadata(path: str = BASEDIR) -> BuildMetadata:
|
|||
raise Exception("invalid build metadata")
|
||||
|
||||
|
||||
def get_agnos_version(directory: str = BASEDIR) -> str:
|
||||
return run_cmd(["bash", "-c", r"unset AGNOS_VERSION && source launch_env.sh && \
|
||||
echo -n $AGNOS_VERSION"], cwd=directory).strip()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from openpilot.common.params import Params
|
||||
|
||||
|
|
Loading…
Reference in New Issue