mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 00:00:37 +08:00
scripts, build: Name all scripts *.sh
… so that `just check-scripts` actually finds all of them.
This commit is contained in:
+14
-14
@@ -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=<user> build/upload 1.3.0-rc.3
|
||||
SSH_LOGIN=<user> 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
|
||||
<!-- an upcoming pre-release rather than something historical. /RL -->
|
||||
|
||||
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=<user> build/release <version>` is used to create a symlink
|
||||
Finally, `SSH_LOGIN=<user> build/release.sh <version>` 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.
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -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."
|
||||
@@ -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"
|
||||
@@ -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 '```'
|
||||
Reference in New Issue
Block a user