Rework init to be a job thing rather than a native command. - #55
Merged
Conversation
✅ Ritten✅ VersionVersion 0.10.0 is valid (latest published: 0.9.0). All 6 packages agree on 0.10.0. ✅ MetadataAll 6 packages carry everything a feed asks for. ✅ ChangelogChangelog entry for 0.10.0 is present. ✅ TestsAll 582 tests passed. ✅ Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
IDotNet's tool methods are one perdotnet toolverb —ToolInstall,ToolUpdate,ToolUninstall, andInstalledToolVersionforlist.IProjectFilesandProjectFileload aritten.jsonas a document, set values by key path, and write it back with everything else intact.Ritten.GitHubmaintains GitHub Actions workflows.IActionsWorkflowsandActionsWorkflowread a workflow file, find its jobs by what they run, and write a job or a trigger back into it without disturbing a line of the rest.Ritten.DotNetmanages the tool manifest.IDotNetgainsToolUpdateandCreateToolManifest, andDotNetProjectsreads what a repository holds.IJob.RequiresProjectis what lets a job create the project file.IWorkflow.IsCompatibleanswers whether a directory looks like its kind, andWorkflowRegistry.IsCompatibleasks each in registration order.IFile.Directoryreturns the directory a file is in, so anything writing a nested file can create the path first, andIDirectory.RelativePath(file)/RelativePath(directory)write a path the way a project file spells one.Changed
ritten initis now a job instead of a command. It runs like every other job, with--dry-run,--verboseand the rest, and each workflow declares its own. A repository with noritten.jsonyet has its workflow detected by what's in it, or--workflowsets one explicitly.WorkflowApplication.SelectWorkflowdetects the workflow for a given directory.RittenProject.Resolveanswers with a synthetic project when nothing has been written yet.ritten.jsonkeeps all its keys, a tool manifest keeps the other tools it pins, and an Actions workflow keeps its other jobs, triggers, and comments.