|=================================|
| ___ ___ ___ _ __ _____ __ |
| / __|/ __/ _ \| '__/ _ \ \/ / |
| \__ \ (_| (_) | | | __/> < |
| |___/\___\___/|_| \___/_/\_\ |
| |
|=================================|
scorex is a small CLI helper for generating S-CORE skeleton applications.
It is implemented in Go in scorex/main.go and uses Cobra for its CLI in scorex/cmd/root.go and scorex/cmd/init.go.
- Generate a new S-CORE Bazel project skeleton
- Pre-wire
MODULE.bazel,.bazelrc,.bazelversion,BUILD, andsrc/main.cpp - Use a central
known_good.jsonto pin module versions and commits
The project layout and files are rendered from the templates in scorex/cmd/templates/application.
From the repository root:
cd scorex
go mod tidy
go build ./...This creates a scorex binary in the scorex/ directory.
Show help:
./scorex --helpGenerate a new S-CORE project (example):
./scorex init \
--module score_baselibs \
--module score_communication \
--name my_score_app \
--dir . \
--bazel-version 8.3.0This will create ./my_score_app with:
MODULE.bazel.bazelrc.bazelversionBUILDsrc/BUILDsrc/main.cpp
The init command (see scorex/cmd/init.go) supports:
--module(repeatable): S-CORE modules to include, e.g.score_communication--name: Name of the generated project (default:score_app)--dir: Target directory where the project is created (default: current directory)--known-good-url: URL or file path toknown_good.json--bazel-version: Bazel version written into.bazelversion(default:8.3.0)
The scorex CLI is distributed through multiple package managers for easy installation across different platforms.
# Add the tap (once a tap repository is created)
brew tap eclipse-score/tap
# Install scorex
brew install scorex# Add the bucket (once a bucket repository is created)
scoop bucket add eclipse-score https://github.com/eclipse-score/scoop-bucket
# Install scorex
scoop install scorexmacOS & Linux:
curl -sSL https://raw.githubusercontent.com/eclipse-score/score_scrample/main/scorex/distribution/install.sh | shDownload the appropriate binary for your platform from the releases page:
- Linux (x86_64):
scorex-VERSION-linux-x86_64.tar.gz - macOS (Apple Silicon):
scorex-VERSION-macos-arm64.tar.gz - macOS (Intel):
scorex-VERSION-macos-x86_64.tar.gz - Windows (x86_64):
scorex-VERSION-windows-x86_64.zip
Extract and move to a directory in your PATH.
-
Create and push a new version tag:
git tag v1.0.0 git push origin v1.0.0
-
GitHub Actions will automatically:
- Build binaries for all platforms
- Create compressed archives
- Generate checksums
- Create a GitHub release
-
Update package manifests:
Homebrew Formula (
distribution/homebrew/scorex.rb):- Update version number
- Update SHA256 checksums from
checksums.txtin the release
Scoop Manifest (
distribution/scoop/scorex.json):- Update version number
- Update SHA256 hash from
checksums.txt
-
Commit and push updated manifests to respective repositories:
- Homebrew: Create/update tap repository at
eclipse-score/homebrew-tap - Scoop: Create/update bucket repository at
eclipse-score/scoop-bucket
- Homebrew: Create/update tap repository at
Homebrew Tap:
- Create repository:
https://github.com/eclipse-score/homebrew-tap - Add
distribution/homebrew/scorex.rbto the repository root orFormula/directory - Users can then install with:
brew install eclipse-score/tap/scorex
Scoop Bucket:
- Create repository:
https://github.com/eclipse-score/scoop-bucket - Add
distribution/scoop/scorex.jsonto thebucket/directory - Users can then install with:
scoop bucket add eclipse-score <repo-url>thenscoop install scorex
After each release, download checksums.txt from the GitHub release and update:
# Example for version 1.0.0
curl -sL https://github.com/eclipse-score/score_scrample/releases/download/v1.0.0/checksums.txt
# Update the SHA256 values in:
# - distribution/homebrew/scorex.rb
# - distribution/scoop/scorex.json