@fibteq/altair-runner 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,6 +48,21 @@ from npm and restarts the background runner on it (`service install` again also
48
48
  `service uninstall` removes it. On Linux it starts when you log in; to start at boot without logging in, run
49
49
  `loginctl enable-linger`.
50
50
 
51
+ ### Threads working at the same time
52
+
53
+ When a shared folder is a git repository, each thread works in its own
54
+ [git worktree](https://git-scm.com/docs/git-worktree) on its own branch, `altair/thr-…`, made from the repository's
55
+ current commit on the thread's first task. Two threads can then work in the same project at once without changing
56
+ each other's files or switching each other's branch, and your own checkout is left alone. Each task's result says
57
+ which branch and folder the work is in; merge or open a PR from that branch as usual.
58
+
59
+ Worktrees live in `~/.altair-runner/worktrees`. They start without your uncommitted changes and without ignored files
60
+ such as `node_modules` or `.env`, so a task may need to install dependencies first. A worktree that has not been used
61
+ for a day, has no uncommitted changes and whose branch is merged into your checkout's branch is removed
62
+ automatically, with its branch. `altair-runner worktrees` lists them, `worktrees prune` cleans up now,
63
+ `worktrees remove <path or branch>` removes one, and `worktrees off` makes threads work in the folder itself again.
64
+ Read-only tasks (`--access read`) always run in the folder itself.
65
+
51
66
  ### What the CLI may do
52
67
 
53
68
  `altair-runner start --access <level>` or `altair-runner service install --access <level>` (saved for next time):
@@ -92,13 +107,16 @@ node packages/altair-runner/dist/cli.js --help
92
107
 
93
108
  ## Releasing
94
109
 
95
- Needs an npm account that is a member of the `fibteq` npm organization.
96
-
97
110
  1. Bump `version` in `package.json` here and in `packages/altair-runner-alias/package.json`, and `RUNNER_VERSION`
98
111
  in `src/runner.ts` (a test checks they match). Bump `RUNNER_PROTOCOL_VERSION` in `@altair/protocol` only when the
99
112
  wire format changes; the server refuses runners on another protocol version and tells them to update.
100
- 2. Publish the runner first, then the short name, with `pnpm` (it replaces `workspace:` versions and uses the
101
- built files from `publishConfig`):
113
+ 2. Merge it. The [Release altair-runner](../../.github/workflows/release-runner.yml) workflow then tests, builds and
114
+ publishes both packages whose version is not on npm yet (it can also be run by hand from the Actions tab).
115
+ It uses npm trusted publishing: once, on npmjs.com, open each package's **Settings > Trusted publishing**, choose
116
+ GitHub Actions and enter `Fibteq-Inc`, `altair` and `release-runner.yml`.
117
+
118
+ By hand instead (needs an npm account in the `fibteq` npm organization), runner first, then the short name, with
119
+ `pnpm` (it replaces `workspace:` versions and uses the built files from `publishConfig`):
102
120
 
103
121
  ```sh
104
122
  npm login