Skip to content

Commit 3f51d00

Browse files
committed
wip
1 parent 94e552e commit 3f51d00

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

.gitattributes

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ docs/*.md linguist-generated=true
44
# see https://git-scm.com/docs/git-archive/2.40.0#ATTRIBUTES
55
# Exclude a bunch of paths to save some disk space
66
e2e export-ignore
7-
.aspect
8-
.github
7+
.aspect export-ignore
8+
.github export-ignore
9+
pkg/*/testdata export-ignore
10+
tools/release export-ignore
11+

.github/workflows/integrity.jq

+6-8
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@
22
# NB: the sha256 files are expected to be newline-terminated.
33
#
44
# Input looks like
5-
# 48552e399a1f2ab97e62ca7fce5783b6214e284330c7555383f43acf82446636 bazeldnf_linux-amd64\nfd265552bfd236efef519f81ce783322a50d8d7ab5af5d08a713e519cedff87f bazeldnf_linux-arm64\n
5+
# 48552e399a1f2ab97e62ca7fce5783b6214e284330c7555383f43acf82446636 bazeldnf-v0.6.0-rc7-linux-amd64\n...
66
#
77
# Output should look like
88
# {
9-
# "bazeldnf_linux-amd64": "48552e399a1f2ab97e62ca7fce5783b6214e284330c7555383f43acf82446636",
10-
# "bazeldnf_linux-x86_64": "fd265552bfd236efef519f81ce783322a50d8d7ab5af5d08a713e519cedff87f"
9+
# "linux-amd64": "48552e399a1f2ab97e62ca7fce5783b6214e284330c7555383f43acf82446636",
10+
# ...
1111
# }
1212

1313
.
14-
# Don't end with an empty object
14+
| sub($ARGS.named.PREFIX; ""; "g")
1515
| rtrimstr("\n")
1616
| split("\n")
17-
| map(
18-
split(" ")
19-
| {"key": .[1], "value": .[0]}
20-
)
17+
| map(split(" "))
18+
| map({"key": .[1], "value": .[0]})
2119
| from_entries

.github/workflows/release_prep.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ PREFIX=$PREFIX ${SCRIPT_DIR}/generate_tools_versions.sh
3030

3131
PREBUILTS=$(jq \
3232
--from-file .github/workflows/integrity.jq \
33+
--arg PREFIX "bazeldnf-${GITHUB_REF_NAME}-" \
3334
--slurp \
3435
--raw-input artifacts/*.sha256 \
3536
)
3637

3738
cat >${PREFIX}/tools/integrity.bzl <<EOF
3839
"Generated during release by release_prep.sh, using integrity.jq"
3940
40-
PREBUILTS = "${PREBUILTS}"
41+
PREBUILTS = ${PREBUILTS}
4142
4243
EOF
4344

bazeldnf/extensions.bzl

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ based on: https://github.com/bazel-contrib/rules-template/blob/0dadcb716f06f6728
66
"""
77

88
load("@bazel_features//:features.bzl", "bazel_features")
9-
load("//bazeldnf/private:toolchains_repo.bzl", "toolchains_repo")
109
load("//internal:rpm.bzl", rpm_repository = "rpm")
1110
load(":repositories.bzl", "bazeldnf_register_toolchains")
1211

@@ -38,7 +37,7 @@ _proxy_repo = repository_rule(
3837

3938
_DEFAULT_NAME = "bazeldnf"
4039

41-
def _handle_rpms(alias, mod, module_ctx):
40+
def _handle_rpms(alias, mod):
4241
if not mod.tags.rpm:
4342
return {}
4443

@@ -98,7 +97,7 @@ def _toolchain_extension(module_ctx):
9897
alias = _alias.name
9998
dev_dependency = _alias.dev_dependency
10099

101-
rpms = _handle_rpms(alias, mod, module_ctx)
100+
rpms = _handle_rpms(alias, mod)
102101
if rpms:
103102
if not dev_dependency:
104103
repos[alias] = 1

bazeldnf/repositories.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file", _http_archive
88
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
99
load("//bazeldnf/private:toolchains_repo.bzl", "toolchains_repo")
1010
load("//tools:integrity.bzl", "PREBUILTS")
11-
load("//tools:version.bzl", "VERSION", "REPO_URL")
11+
load("//tools:version.bzl", "REPO_URL", "VERSION")
1212
load(":platforms.bzl", "PLATFORMS")
1313

1414
def http_archive(name, **kwargs):

tools/version.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"Generated during release generate_tools_prebuilts.sh"
22

3-
VERSION = "v0.6.0-rc6"
3+
VERSION = "v0.5.9"
44

55
REPO_URL = "rmohr/bazeldnf"

0 commit comments

Comments
 (0)