From 244a8b6fca9ebffe7543cdb2b486a78c7df9cf78 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Fri, 30 Oct 2026 12:45:27 +0100 Subject: [PATCH] scripts, build: Name all scripts `*.sh` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … so that `just check-scripts` actually finds all of them. --- RELEASE.md | 28 ++++++++++++------------- build/README.md | 4 ++-- build/{build => build.sh} | 6 +++--- build/{checksums => checksums.sh} | 0 build/{release => release.sh} | 0 build/{rust-version => rust-version.sh} | 0 build/{tag => tag.sh} | 0 build/{upload => upload.sh} | 2 +- build/{version => version.sh} | 0 scripts/{cache-cobs => cache-cobs.sh} | 0 scripts/{changelog => changelog.sh} | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) rename build/{build => build.sh} (96%) rename build/{checksums => checksums.sh} (100%) rename build/{release => release.sh} (100%) rename build/{rust-version => rust-version.sh} (100%) rename build/{tag => tag.sh} (100%) rename build/{upload => upload.sh} (98%) rename build/{version => version.sh} (100%) rename scripts/{cache-cobs => cache-cobs.sh} (100%) rename scripts/{changelog => changelog.sh} (97%) diff --git a/RELEASE.md b/RELEASE.md index 770f7d04c..c1a86a480 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -39,13 +39,13 @@ git config set gpg.format ssh git config set user.signingKey "key::$(rad self --ssh-key)"" ``` -We provide a script for performing the tagging related options, `build/tag`. +We provide a script for performing the tagging related options, `build/tag.sh`. The input to this script does not require the `releases/` prefix. For example, if we want to cut a release for `releases/1.3.0-rc.3`, we would call the script like the following: ``` -build/tag 1.3.0-rc.3 +build/tag.sh 1.3.0-rc.3 ``` The script will ask you to confirm the creation of the tag, showing you the @@ -53,14 +53,14 @@ commit that you're tagging, respond with `y` if it all looks good. ### Run Build The next thing we do is to build the binaries based on the latest tag. We -provide a `build/build` script that performs the build through a Docker +provide a `build/build.sh` script that performs the build through a Docker container. The following requirements are needed for running the build script: * `rad` * `podman` * `sha256sum` -Running `build/build` will find the latest tag and perform the build, this will +Running `build/build.sh` will find the latest tag and perform the build, this will take some time, so grab a coffee ☕. --- @@ -71,10 +71,10 @@ macOS builds. These are ok, and can be ignored. --- ### Verify Artifacts -All artifacts constructed from the `build/build` script will be placed under +All artifacts constructed from the `build/build.sh` script will be placed under `build/artifacts`. Any existing, old artifacts can be removed. -We can then verify the artifacts are present via the `build/checksums` script, +We can then verify the artifacts are present via the `build/checksums.sh` script, which prints the checksum values of all the binaries that were built, noting that there is a binary for different architectures. @@ -92,11 +92,11 @@ The next step is to upload the artifacts to our servers, allowing others to install the binaries, as well as launching the new binaries on our team seed node. -This is achieved through the `build/upload` script, which requires SSH access to +This is achieved through the `build/upload.sh` script, which requires SSH access to `files.radicle.dev`, for example: ``` -SSH_LOGIN= build/upload 1.3.0-rc.3 +SSH_LOGIN= build/upload.sh 1.3.0-rc.3 ``` Once the files are released we can install the binaries via: @@ -121,7 +121,7 @@ We do this using NixOS and the [`radicle-nix`][radicle-nix] and Once all these steps are completed, we can generate the changelog, by first -checking out the relevant tag, and running `scripts/changelog` – you can also +checking out the relevant tag, and running `scripts/changelog.sh` – you can also pass a previous version as `--from-version`. This will output something like the following: @@ -168,7 +168,7 @@ fc6ee5d764941aaf21d33547e837f3908fbddba533a5b17675ae04e1ab68a664 radicle-1.5.0- ``` ~~~ -Once we have the output from `scripts/changelog`, we can post to the internal or +Once we have the output from `scripts/changelog.sh`, we can post to the internal or release candidate topic in Zulip – naming the topic after the release version name. Remember to `@all` so that everyone is notified. Issues that are encountered should be reported in the Zulip topic, so that they can be resolved for the @@ -185,10 +185,10 @@ the changes. Release Process --------------- Once the team feels that the release is ready, the final release can be made. -The `build/tag` step should be repeated for the tag, without the `-rc` suffix. -The `build/build` and `build/upload` steps are repeated. +The `build/tag.sh` step should be repeated for the tag, without the `-rc` suffix. +The `build/build.sh` and `build/upload.sh` steps are repeated. -Finally, `SSH_LOGIN= build/release ` is used to create a symlink +Finally, `SSH_LOGIN= build/release.sh ` is used to create a symlink from version release to the `latest` release – which is used in our install script linked to on [Get Started][website]. @@ -206,7 +206,7 @@ The branch must be named `releases/x.y`, similar to the tagged release, where The `heartwood/CHANGELOG.md` must be updated to reflect the latest changes that were made with regards to the binaries. Many of them should have been included during the development process, such as new features, breaking changes, or fixed -bugs. It is still worth checking `scripts/changelog` to see if there were any +bugs. It is still worth checking `scripts/changelog.sh` to see if there were any missed notes. Once the change log is finalized with a header using the version number, e.g. diff --git a/build/README.md b/build/README.md index 51ec10768..f2c6d96df 100644 --- a/build/README.md +++ b/build/README.md @@ -14,7 +14,7 @@ be reproducible, byte for byte. To run the build, simply enter the following command from the repository root: - build/build + build/build.sh This will build all targets and place the output in `build/artifacts` with one sub-directory per build target. @@ -36,7 +36,7 @@ Here's an example output for a development version of Radicle: 1a8327854f16ea90491fb90e0c3291a63c4b2ab01742c8435faec7d370cacb79 radicle-1.0.0-rc.4-3-gb299f3b5-x86_64-apple-darwin.tar.xz 709ac67541ff0c0c570ac22ab2de9f98320e0cc2cc9b67f1909c014a2bb5bd49 radicle-1.0.0-rc.4-3-gb299f3b5-x86_64-unknown-linux-musl.tar.xz -A script is included in `build/checksums` to output these checksums after +A script is included in `build/checksums.sh` to output these checksums after the artifacts are built. ## Requirements diff --git a/build/build b/build/build.sh similarity index 96% rename from build/build rename to build/build.sh index 7a83506b2..277f641d1 100755 --- a/build/build +++ b/build/build.sh @@ -24,9 +24,9 @@ main() { rev="$(git rev-parse HEAD)" keypath="$(rad path)/keys/radicle.pub" - version="$(build/version)" + version="$(build/version.sh)" image=radicle-build-$version - rust_version="$(build/rust-version)" + rust_version="$(build/rust-version.sh)" if [ ! -f "$keypath" ]; then echo "fatal: no key found at $keypath" >&2 ; exit 1 @@ -86,7 +86,7 @@ main "$@" # Show artifact checksums. echo -build/checksums +build/checksums.sh echo echo "Build successful." diff --git a/build/checksums b/build/checksums.sh similarity index 100% rename from build/checksums rename to build/checksums.sh diff --git a/build/release b/build/release.sh similarity index 100% rename from build/release rename to build/release.sh diff --git a/build/rust-version b/build/rust-version.sh similarity index 100% rename from build/rust-version rename to build/rust-version.sh diff --git a/build/tag b/build/tag.sh similarity index 100% rename from build/tag rename to build/tag.sh diff --git a/build/upload b/build/upload.sh similarity index 98% rename from build/upload rename to build/upload.sh index 69ce4d4a0..a269ef315 100755 --- a/build/upload +++ b/build/upload.sh @@ -6,7 +6,7 @@ SSH_ADDRESS=${SSH_ADDRESS:-$SSH_LOGIN@files.radicle.dev} SSH_KEY="$(rad path)/keys/radicle" main() { - version="$(build/version)" + version="$(build/version.sh)" nid="$(rad self --did | cut -d: -f3-)" rad_url="$(rad . | sed s/rad:/rad:\\/\\//)" rad_remote="$rad_url/$nid" diff --git a/build/version b/build/version.sh similarity index 100% rename from build/version rename to build/version.sh diff --git a/scripts/cache-cobs b/scripts/cache-cobs.sh similarity index 100% rename from scripts/cache-cobs rename to scripts/cache-cobs.sh diff --git a/scripts/changelog b/scripts/changelog.sh similarity index 97% rename from scripts/changelog rename to scripts/changelog.sh index 37d57fe99..bf599260d 100755 --- a/scripts/changelog +++ b/scripts/changelog.sh @@ -29,7 +29,7 @@ while [ $# -gt 0 ]; do done # Current/latest tag. -version="$(build/version)" +version="$(build/version.sh)" current="releases/${version}" if ! git rev-parse --verify "$current^{tag}" >/dev/null 2>&1; then @@ -84,5 +84,5 @@ echo "## Checksums" echo echo '```' -build/checksums +build/checksums.sh echo '```'