Skip to content

Commit

Permalink
chore: bump to bazel-lib 2.0rc
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Oct 10, 2023
1 parent ba6e13e commit 18b5c2e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "aspect_bazel_lib", version = "2.0.0-beta0")
bazel_dep(name = "aspect_bazel_lib", version = "2.0.0-rc0")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "platforms", version = "0.0.5")

Expand Down
6 changes: 3 additions & 3 deletions oci/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def rules_oci_dependencies():

http_archive(
name = "aspect_bazel_lib",
sha256 = "39ecbb25198950bab1cddc0f36e271f95a3e8bdb102c70e5c3ca6beb48602799",
strip_prefix = "bazel-lib-2.0.0-beta0",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.0.0-beta0/bazel-lib-v2.0.0-beta0.tar.gz",
sha256 = "91acfc0ef798d3c87639cbfdb6274845ad70edbddfd92e49ac70944f08f97f58",
strip_prefix = "bazel-lib-2.0.0-rc0",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.0.0-rc0/bazel-lib-v2.0.0-rc0.tar.gz",
)
5 changes: 2 additions & 3 deletions oci/private/tarball.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ mtree=$(mktemp)
function add_to_tar() {
content=$1
tar_path=$2
local mtree_flags="uid=0 gid=0 mode=0755 time=1672560000 type=file"
echo >>"${mtree}" "${tar_path} ${mtree_flags} content=${content}"
echo >>"${mtree}" "${tar_path} uid=0 gid=0 mode=0755 time=1672560000 type=file content=${content}"
}

MANIFEST_DIGEST=$(${YQ} eval '.manifests[0].digest | sub(":"; "/")' "${IMAGE_DIR}/index.json" | tr -d '"')
Expand All @@ -42,7 +41,7 @@ layers="${LAYERS}" \
--null-input '.[0] = {"Config": env(config), "RepoTags": "${repo_tags}" | envsubst | split("%") | map(select(. != "")) , "Layers": env(layers) | map( "blobs/" + . + ".tar.gz") }' \
--output-format json > "${manifest_json}"

add_to_tar "${manifest_json}" "manifest.json"
add_to_tar "${manifest_json}@HOM" "manifest.json"

# We've created the manifest, now hand it off to tar to create our final output
"${TAR}" --create --file "${TARBALL_PATH}" "@${mtree}"

0 comments on commit 18b5c2e

Please sign in to comment.