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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ and versions are tracked in the repo-root `VERSION` file.
### Added

- Initialized the repository with the Base-managed repo baseline.

### Changed

- Declared `base-bash-libs` as a required source dependency, kept `base-cli`
required, and made the first-party CLI and Bash-library demos optional.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ basectl workspace doctor --manifest workspace.yaml
basectl workspace clone --manifest workspace.yaml --dry-run
```

The manifest keeps Base's source dependencies required: `base`,
`base-bash-libs`, and `base-cli`. The first-party `base-cli-demo` and
`base-bash-libs-demo` repositories remain listed for discovery and workspace
updates, but are optional for a normal Base checkout. Use
`basectl workspace clone --manifest workspace.yaml --include-optional` when a
local checkout also needs those demos.

## Base

This repository is managed by [Base](https://github.com/basefoundry/base).
Expand Down
33 changes: 33 additions & 0 deletions tests/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,37 @@ if grep -Eq 'default_branch:[[:space:]]*master\b' workspace.yaml; then
exit 1
fi

assert_manifest_repo() {
local name="$1"
local url="$2"
local required="$3"

if ! awk -v expected_name="$name" \
-v expected_url="$url" \
-v expected_required="$required" '
/^ - name:/ {
if (in_entry) {
exit
}
in_entry = ($3 == expected_name)
next
}
in_entry && $1 == "url:" { actual_url = $2 }
in_entry && $1 == "default_branch:" { actual_branch = $2 }
in_entry && $1 == "required:" { actual_required = $2 }
END {
exit !(in_entry && actual_url == expected_url && actual_branch == "main" && actual_required == expected_required)
}
' workspace.yaml; then
printf 'workspace.yaml has an unexpected %s repository contract.\n' "$name" >&2
exit 1
fi
}

assert_manifest_repo base git@github.com:basefoundry/base.git true
assert_manifest_repo base-bash-libs git@github.com:basefoundry/base-bash-libs.git true
assert_manifest_repo base-cli git@github.com:basefoundry/base-cli.git true
assert_manifest_repo base-cli-demo https://github.com/basefoundry/base-cli-demo.git false
assert_manifest_repo base-bash-libs-demo https://github.com/basefoundry/base-bash-libs-demo.git false

printf 'Repository baseline is present.\n'
9 changes: 7 additions & 2 deletions workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ repos:
default_branch: main
required: true

- name: base-bash-libs
url: git@github.com:basefoundry/base-bash-libs.git
default_branch: main
required: true

- name: base-cli
url: git@github.com:basefoundry/base-cli.git
default_branch: main
Expand All @@ -17,7 +22,7 @@ repos:
- name: base-cli-demo
url: https://github.com/basefoundry/base-cli-demo.git
default_branch: main
required: true
required: false

- name: base-workspace
url: git@github.com:basefoundry/base-workspace.git
Expand Down Expand Up @@ -47,7 +52,7 @@ repos:
- name: base-bash-libs-demo
url: https://github.com/basefoundry/base-bash-libs-demo.git
default_branch: main
required: true
required: false

- name: base-platform-tools
url: https://github.com/basefoundry/base-platform-tools.git
Expand Down
Loading