Let's introduce a new command patch: it'll update an existing remote resource without downloading the full spec file. It can accept patch file or patch statements. For patch command it automatically create spec in memory, update it using patch file or statements and modify remote resources according to these changes.
Patch file provides yaml representation of fields that should be updated, e.g. gitstrap patch -f repo.yml g4s8/gitstrap with repo.yml file's content:
spec:
description: "New repository description"
will change repository description of g4s8/gitstrap repo.
Patch statements can modify specs without editing file. Each statement should be valid YAML document, it should accept one-line documents. E.g. gitstrap patch -s 'spec: { visibility: private }' g4s8/gitstrap changes visibility of repository to private. Patch command can accept one or more statements at once, and one or more changes in one statement: e.g.
gitstrap patch \
-s 'spec: { visibility: private, license: MIT }' \
-s 'spec: { features: [issues, pages] }' \
g4s8/gitstrap
Let's introduce a new command
patch: it'll update an existing remote resource without downloading the full spec file. It can accept patch file or patch statements. For patch command it automatically create spec in memory, update it using patch file or statements and modify remote resources according to these changes.Patch file provides yaml representation of fields that should be updated, e.g.
gitstrap patch -f repo.yml g4s8/gitstrapwithrepo.ymlfile's content:will change repository description of g4s8/gitstrap repo.
Patch statements can modify specs without editing file. Each statement should be valid YAML document, it should accept one-line documents. E.g.
gitstrap patch -s 'spec: { visibility: private }' g4s8/gitstrapchanges visibility of repository to private. Patch command can accept one or more statements at once, and one or more changes in one statement: e.g.