Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ live in `rain.factory` and arrive as the `rain-factory` Soldeer dependency

- `src/generated/<tag>/` snapshots are **frozen**: a release ADDS a new tag dir,
never edits or deletes an existing one. CI enforces append-only.
- `[package].version` is the **last released** version — it names the current
`src/generated/<tag>/` snapshot. A normal PR does not bump it; only a release
moves it, in lockstep with the snapshot.
- `[external.package].version` is the **last released** version — it names the
current `src/generated/<tag>/` snapshot. A normal PR does not bump it; only a
release moves it, in lockstep with the snapshot.
- `LibCloneFactoryDeploy.sol` aliases the current tag's snapshot;
`script/BuildPointers.sol` regenerates both. Generated files — do not
hand-edit.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tagging: the `Manual sol artifacts` workflow runs `script/Deploy.sol` for the
`clone-factory` suite. Tagging then runs `rainix-tag-release`, which never
broadcasts a deploy itself; its mechanics live in rainix.

Nothing publishes on merge, so `[package].version` and the frozen
Nothing publishes on merge, so `[external.package].version` and the frozen
`src/generated/<tag>/` snapshot it names only ever move together.

See rainlanguage/rain.factory#46 for the split rationale.
10 changes: 9 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[package]
# Release metadata, not foundry config. `[external.*]` is the namespace foundry
# reserves for other tools and ignores outright, so it raises no unknown-section
# warning and `forge config --fix` leaves it alone (a section foundry does not
# reserve is read as a profile, warned about on every invocation and rewritten
# into `[profile.*]` by the fixer). `version` is the last-published Soldeer
# release — a deploy repo moves it only via a manual `sol-v*` tag, in lockstep
# with the frozen `src/generated/<tag>/` snapshot it names — and is read here by
# `script/BuildPointers.sol` (`deployTag()`) to locate that snapshot.
[external.package]
name = "rain-factory-deploy"
version = "0.1.5"

Expand Down
6 changes: 3 additions & 3 deletions script/BuildPointers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ contract BuildPointers is Script {
// REUSE-IgnoreEnd

/// @notice The canonical release tag. Read from `foundry.toml`
/// `[package].version` — the single source of truth — with dots converted to
/// underscores for the Solidity dir form (`0.1.3` -> `0_1_3`).
/// `[external.package].version` — the single source of truth — with dots
/// converted to underscores for the Solidity dir form (`0.1.3` -> `0_1_3`).
function deployTag() internal view returns (string memory) {
string memory version = vm.parseTomlString(vm.readFile("foundry.toml"), ".package.version");
string memory version = vm.parseTomlString(vm.readFile("foundry.toml"), ".external.package.version");
bytes memory b = bytes(version);
bytes memory out = new bytes(b.length);
for (uint256 i = 0; i < b.length; i++) {
Expand Down
Loading