From 7f869a19786c1ae51c4e0948b69f351da652ae0c Mon Sep 17 00:00:00 2001 From: Gerald Pinder Date: Mon, 25 Nov 2024 21:12:13 -0500 Subject: [PATCH] chore: Prepare for the v0.9.0 release --- Cargo.toml | 19 ++++++++++++++++++- scripts/exports.sh | 19 ------------------- scripts/setup.sh | 1 - template/templates/modules/copy/README.md | 4 ---- template/templates/stages.j2 | 1 - 5 files changed, 18 insertions(+), 26 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a7560fe9..03e65397 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -102,7 +102,24 @@ users.workspace = true [features] # Top level features -default = [] +default = [ + "v0_9_0" +] + +# v0.9.0 features +v0_9_0 = [ + "init", + "stages", + "copy", + "iso", + "switch", + "login", + "validate", + "sigstore", + "multi-recipe", + "prune", + "rechunk", +] init = [] stages = ["blue-build-recipe/stages"] copy = ["blue-build-recipe/copy"] diff --git a/scripts/exports.sh b/scripts/exports.sh index b15ed697..3cae0768 100644 --- a/scripts/exports.sh +++ b/scripts/exports.sh @@ -1,23 +1,5 @@ #!/usr/bin/env bash -# Function to retrieve module configs and populate an array -# Arguments: -# 1. Variable name to store result -# 2. jq query -# 3. Module config content -get_yaml_array() { - local -n arr="${1}" - local jq_query="${2}" - local module_config="${3}" - - if [[ -z "${jq_query}" || -z "${module_config}" ]]; then - echo "Usage: get_yaml_array VARIABLE_TO_STORE_RESULTS JQ_QUERY MODULE_CONFIG" >&2 - return 1 - fi - - readarray -t arr < <(echo "${module_config}" | yq -I=0 "${jq_query}") -} - # Function to retrieve module configs and populate an array # Arguments: # 1. Variable name to store result @@ -67,7 +49,6 @@ export OS_VERSION="$(grep -Po "(?<=VERSION_ID=)\d+" /usr/lib/os-release)" export OS_ARCH="$(uname -m)" # Export functions for use in sub-shells or sourced scripts -export -f get_yaml_array export -f get_json_array mkdir -p /var/roothome /var/opt /var/lib/alternatives /var/opt /var/usrlocal diff --git a/scripts/setup.sh b/scripts/setup.sh index b8d7563e..cc0d6316 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -18,4 +18,3 @@ if [ -f /etc/os-release ]; then echo "OS not detected, proceeding without setup" fi fi -cp /tmp/bins/yq /usr/bin/ diff --git a/template/templates/modules/copy/README.md b/template/templates/modules/copy/README.md index a35ba9b6..b5aa19ca 100644 --- a/template/templates/modules/copy/README.md +++ b/template/templates/modules/copy/README.md @@ -4,10 +4,6 @@ Only compiler-based builds can use this module as it is built-in to the BlueBuild CLI tool. ::: -:::note -**NOTE:** This module is currently only available with the `use_unstable_cli` option on the GHA or using the `main` image. -::: - The `copy` module is a short-hand method of adding a [`COPY`](https://docs.docker.com/reference/dockerfile/#copy) instruction into the image. This can be used to copy files from images, other stages, or even from the build context. ## Usage diff --git a/template/templates/stages.j2 b/template/templates/stages.j2 index bbcddaf4..3fa08b69 100644 --- a/template/templates/stages.j2 +++ b/template/templates/stages.j2 @@ -25,7 +25,6 @@ COPY ./modules /modules # can be added to the ostree commits. FROM scratch AS stage-bins COPY --from=gcr.io/projectsigstore/cosign /ko-app/cosign /bins/cosign -COPY --from=docker.io/mikefarah/yq /usr/bin/yq /bins/yq COPY --from=ghcr.io/blue-build/cli: {%- if let Some(tag) = recipe.blue_build_tag -%} {{ tag }}