Versions save themselves
You do not save a version by hand. Signed in, each run of a changed file saves a version in the background. The run’s last line saysSaved as version N with a dashboard link, or Will save when online. A failed save never stops or fails a run. Any later method command sends what is left in the outbox (~/.cache/method/outbox).
A version is identified by its content: v_ and the first 32 hex digits of sha256(METHOD_ID:package digest). The same content is always the same version. Go back to earlier content (for example with git) and the run finds the existing version. Two computers can save at the same time; each version records its parent.
The package of a version holds the Method file and its declared files (script entrypoints are included automatically). Run a saved version on another computer with method run wf_… --version v_…, or make a local copy with method get wf_… --out task.method.
The id: line
The first signed-in run writes id: wf_… as the second line of the file. It links the file to its Method. The content digest leaves it out. A renamed or moved file keeps its Method. A copy keeps it too: run method new-id copy.method to make the copy a new Method.
Publish
publish marks the version of the file’s current content as published. Production runs, schedules, and shared links use the published version by default. In order, it:
- checks the issues: an error stops the publish, and nothing is published (see The issue checker);
- finishes the upload, with no time limit while bytes move;
- runs the Method’s cases: a version that breaks an approved case is refused (see Review, cases, and tests);
- makes the missing script cards; a failed card check never blocks;
- marks the version published with the reason (default
Published.).
--cloud runs the production runs of the environment on Method Cloud; --workers moves them back to your workers. --env NAME selects the environment (default production).
Find versions
method list lists your Methods. The dashboard shows each version, its parent, its runs, and which one is published. Restore an older version on the dashboard; it becomes a new version.