fix(canary): list all 27 linked packages in dummy changeset (#1882)
* fix(canary): list all 27 linked packages in dummy changeset Only @aoagents/ao was listed, so changeset version --snapshot only bumped that one package. The other 26 stayed at their stable version and changeset publish skipped them as already published. * fix(canary): generate dummy changeset from config.json Reads linked packages from .changeset/config.json at runtime instead of hardcoding them. Avoids drift when packages are added/removed. Also replaces 1000-char printf with readable node script. * fix(canary): use heredoc for node script to avoid shell quoting issues The double-quoted node -e broke on the \" inside the JS string. Heredoc avoids all shell quoting problems. * fix(canary): escape newlines in JS heredoc strings Single-quoted JS strings cannot span real newlines. Use \n escape sequences instead of literal line breaks. * fix(canary): outdent heredoc terminator to column 0 YAML `run: |` strips 10-space base indentation, so `SCRIPT` at 12-space YAML indent lands at column 2 in the shell. Bash `<<` requires the terminator at column 0. Move to 10-space indent (= column 0 after YAML strip).
This commit is contained in:
parent
8c71bdebbd
commit
45de80ce3f
|
|
@ -111,7 +111,14 @@ jobs:
|
|||
# create a minimal one. `changeset version --snapshot` consumes and
|
||||
# deletes it, so no cleanup is needed.
|
||||
if [ -z "$(ls .changeset/*.md 2>/dev/null | grep -vi 'README')" ]; then
|
||||
printf -- '---\n"@aoagents/ao": patch\n---\n\nchore: canary build\n' > .changeset/canary-temp.md
|
||||
node << 'SCRIPT'
|
||||
const cfg = require('./.changeset/config.json');
|
||||
const pkgs = cfg.linked.flat();
|
||||
let body = '---\n';
|
||||
pkgs.forEach(p => body += '"' + p + '": patch\n');
|
||||
body += '---\n\nchore: canary build\n';
|
||||
require('fs').writeFileSync('.changeset/canary-temp.md', body);
|
||||
SCRIPT
|
||||
fi
|
||||
pnpm changeset version --snapshot nightly
|
||||
env:
|
||||
|
|
|
|||
Loading…
Reference in New Issue