Skip to content

Commit

Permalink
Makefile.toml: do not fetch-sources unnecessarily
Browse files Browse the repository at this point in the history
Many cargo-make targets were fetching sources as an artifact from when
publication tools were built as part of the bottlerocket monorepo.
Now that Twoliter builds bundles these publication tools, we have need
to fetch project sources.
  • Loading branch information
cbgbt committed Sep 6, 2024
1 parent 8cf1e40 commit 4703ab6
Showing 1 changed file with 6 additions and 46 deletions.
52 changes: 6 additions & 46 deletions twoliter/embedded/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -984,10 +984,7 @@ run_task = "publish-setup"
# to create a repo under /build/repos, named after the arch/variant/version,
# containing subdirectories for the repo metadata and targets.
[tasks.repo]
# Rather than depend on "build", which currently rebuilds images each run, we
# check for the image files below to save time. This does mean that `cargo
# make` must be run before `cargo make repo`.
dependencies = ["publish-setup", "fetch-sources"]
dependencies = ["publish-setup"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1084,7 +1081,7 @@ ln -sfn "${PUBLISH_REPO_OUTPUT_DIR##*/}" "${PUBLISH_REPO_OUTPUT_DIR%/*}/latest"
]

[tasks.validate-repo]
dependencies = ["publish-setup-without-key", "fetch-sources"]
dependencies = ["publish-setup-without-key"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1150,7 +1147,7 @@ run_task = "fetch-variant"
run_task = "fetch-friendly-variant"

[tasks.check-repo-expirations]
dependencies = ["publish-setup-without-key", "fetch-sources"]
dependencies = ["publish-setup-without-key"]
script_runner = "bash"
script = [
'''
Expand All @@ -1174,7 +1171,7 @@ pubsys \
]

[tasks.refresh-repo]
dependencies = ["publish-setup", "fetch-sources"]
dependencies = ["publish-setup"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1205,10 +1202,7 @@ pubsys \
]

[tasks.ami]
# Rather than depend on "build", which currently rebuilds images each run, we
# depend on publish-tools and check for the image files below to save time.
# This does mean that `cargo make` must be run before `cargo make ami`.
dependencies = ["setup-build", "fetch-sources"]
dependencies = ["setup-build"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1278,10 +1272,6 @@ ln -snf "${ami_output##*/}" "${ami_output_latest}"
]

[tasks.ami-public]
# Rather than depend on "build", which currently rebuilds images each run, we
# depend on publish-tools and check for the input file below to save time.
# This does mean that `cargo make ami` must be run before `cargo make ami-public`.
dependencies = ["fetch-sources"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1309,10 +1299,6 @@ pubsys \
]

[tasks.ami-private]
# Rather than depend on "build", which currently rebuilds images each run, we
# depend on publish-tools and check for the input file below to save time.
# This does mean that `cargo make ami` must be run before `cargo make ami-private`.
dependencies = ["fetch-sources"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1340,10 +1326,6 @@ pubsys \
]

[tasks.grant-ami]
# Rather than depend on "build", which currently rebuilds images each run, we
# depend on publish-tools and check for the input file below to save time.
# This does mean that `cargo make ami` must be run before `cargo make grant-ami`.
dependencies = ["fetch-sources"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1379,10 +1361,6 @@ pubsys \
]

[tasks.revoke-ami]
# Rather than depend on "build", which currently rebuilds images each run, we
# depend on publish-tools and check for the input file below to save time.
# This does mean that `cargo make ami` must be run before `cargo make revoke-ami`.
dependencies = ["fetch-sources"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1418,10 +1396,6 @@ pubsys \
]

[tasks.validate-ami]
# Rather than depend on "build", which currently rebuilds images each run, we
# depend on publish-tools and check for the input file below to save time.
# This does mean that `cargo make ami` must be run before `cargo make validate-ami`.
dependencies = ["fetch-sources"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1449,10 +1423,6 @@ pubsys \
]

[tasks.ssm]
# Rather than depend on "build", which currently rebuilds images each run, we
# depend on publish-tools and check for the input file below to save time.
# This does mean that `cargo make ami` must be run before `cargo make ssm`.
dependencies = ["fetch-sources"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1487,7 +1457,6 @@ pubsys \
]

[tasks.promote-ssm]
dependencies = ["fetch-sources"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1522,10 +1491,6 @@ pubsys \
]

[tasks.validate-ssm]
# Rather than depend on "build", which currently rebuilds images each run, we
# depend on publish-tools and check for the input file below to save time.
# This does mean that `cargo make ssm` must be run before `cargo make validate-ssm`.
dependencies = ["fetch-sources"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1553,7 +1518,6 @@ pubsys \
]

[tasks.publish-kit]
dependencies = ["fetch-sources"]
script_runner = "bash"
script = [
'''
Expand Down Expand Up @@ -1583,11 +1547,7 @@ pubsys \
]

[tasks._upload-ova-base]
# Rather than depend on "build", which currently rebuilds images each run, we
# depend on publish-tools and check for the image files below to save time.
# This does mean that `cargo make` must be run before
# `cargo make _upload-ova-base`.
dependencies = ["setup-build", "fetch-sources"]
dependencies = ["setup-build"]
script_runner = "bash"
script = [
'''
Expand Down

0 comments on commit 4703ab6

Please sign in to comment.