Publishing
Fetch and pin apps in a workspace, install them per site, and uninstall or remove them.
An app is a git repository. A workspace pins each app's git URL, tag and commit in cardinal.workspace.exs, so every build of the workspace has the same code.
[
apps: [
erp: [
git: "git@github.com:revaik-org/erp-cardinal.git",
commit: "413c90857d18ad456649de5c2724fe0d7b523bff"
]
],
name: "cardinal-sample"
]Release a version
Raise version in app.exs. A site refuses a downgrade.
Add a patch under patches/<version>/ if old data needs a change.
Tag the commit, such as v1.2.0, and push the tag.
Fetch an app
cardinal app get https://github.com/acme/library.git --ref v1.2.0 --trust
cardinal app get acme/library@v1.2.0 --trust
cardinal app get library --link ../libraryapp get takes a git URL, org/repo@tag as GitHub shorthand, or --link PATH for a local checkout. It refuses a tag that no longer points at the pinned commit. Sources outside the revaik-org GitHub organization need --trust.
| Flag | Effect |
|---|---|
--ref REF | The ref to fetch, such as a tag |
--trust | Allows a source outside the allow-list |
--resolve-deps | Also fetches the apps in requires, at their pinned commits |
--overwrite | Replaces an app already in the workspace |
--skip-build | Skips compiling the workspace afterwards |
cardinal update fast-forwards each app to its branch's upstream and repins its commit. It skips an app that is linked, pinned to a tag, or has uncommitted changes.
Install on a site
Apps install per site. A site's tables hold only the apps it installed.
cardinal app install -t mysite.localhost library
cardinal new-site other.localhost --install-app libraryInstall adds any missing required apps first. cardinal migrate -t HOST upgrades only the apps a site has installed. cardinal app list prints the apps in hook order.
Uninstall and remove
cardinal app uninstall -t mysite.localhost library
cardinal app remove libraryUninstall renames the app's tables to _uninstalled_library_* and removes its fixtures, Custom Fields and modules, so a reinstall brings the rows back. It refuses core and any app another installed app requires.
app remove takes the app out of the workspace and archives its source. It refuses while a site has the app installed, unless you pass --force.
Licence
Cardinal apps are closed source. The scaffold writes a proprietary LICENSE stub. Keep "private": true and "license": "UNLICENSED" in frontend/package.json, and add no Hex package block to mix.exs.