Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
phlax committed Aug 20, 2024
1 parent 45e1dc0 commit 6386720
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ common:ci --//:aptly-custom=//:.aptly-ci-override
common:debs-ci --config=ci
common:debs-ci --//debs:excludes=//debs:custom-excludes.txt
# common:debs-ci --//debs:token=//debs:token.txt

common:publish-ci --config=debs-ci
common:publish-ci --//tools/tarball:target=//:html
common:publish-ci --//tools/tarball:overwrite=//tools/tarball:true
10 changes: 10 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,13 @@ jq(
.[0] * .[1]
""",
)

genrule(
name = "html",
outs = ["tar.gz"],
cmd = """
$(location //debs:publish)
tar cf $@ -C /opt/build/cache/html .
""",
tools = ["//debs:publish"]
)
2 changes: 1 addition & 1 deletion build-repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ fi
import_public_key
generate_private_key
create_excludes
bazel run --config=debs-ci //debs:publish
bazel run --config=publish-ci //tools/tarball:unpack /opt/build/repo/html
1 change: 1 addition & 0 deletions debs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,5 @@ sh_binary(
"//:envoy-maintainers-public.key",
":debs"
],
visibility = ["//visibility:public"],
)
10 changes: 0 additions & 10 deletions debs/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,12 @@ publish_repository () {
done
}

publish_index () {
PUBLIC_DIR="$(publish_dir)"
KEY_URL="${DEPLOY_PRIME_URL}/envoy-maintainer-public.key"
cat "$MAINTAINER_KEY" > "${PUBLIC_DIR}/envoy-maintainer-public.key"
echo "<h1>COMING SOON: ${DEPLOY_PRIME_URL}</h1>" > "${PUBLIC_DIR}/index.html"
echo "<div>Signing key: <a href=\"${KEY_URL}\">${KEY_URL}</div>" >> "${PUBLIC_DIR}/index.html"
echo "COMING SOON: ${DEPLOY_PRIME_URL}" > "${PUBLIC_DIR}/index.html"
}

main () {
create_dirs
create_repos
unpack_debs
include_debs
publish_repository
publish_index
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build]
publish = "repository"
publish = "html"
command = "./build-repository.sh"

[build.environment]
Expand Down

0 comments on commit 6386720

Please sign in to comment.