diff options
Diffstat (limited to 'scripts/README.md')
| -rw-r--r-- | scripts/README.md | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..65b69ee --- /dev/null +++ b/scripts/README.md | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | # Build Scripts | ||
| 2 | |||
| 3 | This directory contains scripts for building and releasing the oar-p2p binary. | ||
| 4 | |||
| 5 | ## Scripts | ||
| 6 | |||
| 7 | ### build-static.sh | ||
| 8 | |||
| 9 | Builds statically linked binaries for Linux and macOS. | ||
| 10 | |||
| 11 | ```bash | ||
| 12 | # Build for all platforms (macOS only) | ||
| 13 | ./scripts/build-static.sh all | ||
| 14 | |||
| 15 | # Build for Linux only | ||
| 16 | ./scripts/build-static.sh linux | ||
| 17 | |||
| 18 | # Build for macOS only (macOS only) | ||
| 19 | ./scripts/build-static.sh macos | ||
| 20 | |||
| 21 | # Specify custom output directory | ||
| 22 | ./scripts/build-static.sh linux /path/to/output | ||
| 23 | ``` | ||
| 24 | |||
| 25 | **Note**: Cross-compilation is not supported. Linux binaries must be built on Linux, and macOS binaries must be built on macOS. The GitHub Actions workflow handles this by using different runners. | ||
| 26 | |||
| 27 | ### prepare-release.sh | ||
| 28 | |||
| 29 | Prepares a release by building binaries, creating tarballs, and generating checksums. | ||
| 30 | |||
| 31 | ```bash | ||
| 32 | # Prepare release for version v1.0.0 | ||
| 33 | ./scripts/prepare-release.sh v1.0.0 | ||
| 34 | |||
| 35 | # Specify custom output directory | ||
| 36 | ./scripts/prepare-release.sh v1.0.0 /path/to/dist | ||
| 37 | ``` | ||
| 38 | |||
| 39 | The script will: | ||
| 40 | 1. Build static binaries for the current platform | ||
| 41 | 2. Create tarballs with the binary and README | ||
| 42 | 3. Generate SHA256 and SHA512 checksums | ||
| 43 | 4. Create a release notes template | ||
| 44 | |||
| 45 | ## GitHub Actions | ||
| 46 | |||
| 47 | The `.github/workflows/release.yml` workflow automatically: | ||
| 48 | 1. Triggers on version tags (e.g., `v1.0.0`) | ||
| 49 | 2. Builds binaries on Linux and macOS runners | ||
| 50 | 3. Creates a GitHub release with all artifacts | ||
| 51 | |||
| 52 | To create a release: | ||
| 53 | ```bash | ||
| 54 | git tag -a v1.0.0 -m "Release v1.0.0" | ||
| 55 | git push origin v1.0.0 | ||
| 56 | ``` \ No newline at end of file | ||
