Skip to content

Commit c803fed

Browse files
committed
Update migration notes in README for 0.2.x/0.1.x
1 parent 9588305 commit c803fed

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This template uses the code-scaffolding tool [copier](https://copier.readthedocs
44
Copier supports code lifecycle management, allowing you to seamlessly incorporate updates into your project when the template is enhanced.
55

66
* Early releases (0.1.x) maintain backwards compatibility with [linkml-project-cookiecutter](https://github.com/linkml/linkml-project-cookiecutter/). This facilitates to experiment with the migration of existing cruft/cookiecutter-based projects.
7-
* Later releases starting with 0.2.0 will gradually give up compatibility.
7+
* Starting from 0.2.x we give up compatibility to introduce new features and to re-organise and clean-up the code. The migration from 0.1.x to 0.2.x is not too difficult but requires some manual work.
88

99
The generated project uses [just](https://github.com/casey/just) as preferred command runner, even in the 0.1.x releases.
1010

@@ -151,9 +151,12 @@ just testdoc
151151
3. Configure your repository for deploying the documentation as GitHub pages
152152

153153
* Under Settings > Actions > General in section "Workflow Permissions" mark "Read repository and packages permission".
154-
* Under Pages in section "Build and Deployment":
155-
* Under "Source" select "Deploy from a branch"
156-
* Under "Branch" select "gh-pages" and "/ (root)"
154+
* Go to "Actions" tab, select on the left under Actions "Deploy docs", and click the "Run workflow" button on the right.
155+
Run from main-branch as suggested and verify successful completion.
156+
* Now go back to Settings > Pages. In section "Build and Deployment" select
157+
* Under "Source": "Deploy from a branch"
158+
* Under "Branch": "gh-pages" and "/ (root)"
159+
* Hint: The "gh-pages" branch is created automatically in the first successful run of the "deploy docs" workflow.
157160

158161
### Step 7: Register the schema
159162

@@ -176,16 +179,24 @@ The commands are written to be run at the root of your project.
176179
git switch -c migrate-to-copier
177180
```
178181

179-
180-
* Adapt your project and create a copier answers file (`.copier-answers`) by running:
182+
* Adapt your project and create a copier answers file (`.copier-answers`) by running (this updates to the latest released version):
181183

182184
```shell
183-
copier copy --trust --skip-tasks --vcs-ref=HEAD gh:dalito/linkml-project-copier .
185+
copier copy --trust gh:dalito/linkml-project-copier .
184186
```
185187

186-
If you start from a linkml-project-cookiecutter based project,
187-
look into the `.cruft.json` file to find out which values you chose when you created your project.
188-
Be sure to enter the same values when answering the copier questions.
188+
* **Starting from a linkml-project-cookiecutter based project**:
189+
You may want to migrate in two steps to reduces the number of changes to review.
190+
For the first step, a migration to the 0.1.x-series is suggested,
191+
which still has the same directory layout as linkml-project-cookiecutter.
192+
The command for migrating to a specific tag/release is:
193+
194+
```shell
195+
copier copy --trust --vcs-ref v0.1.6 gh:dalito/linkml-project-copier .
196+
```
197+
198+
Look into the `.cruft.json` file to find out which values you chose when you created your original project.
199+
Be sure to enter the same values when answering the copier questions.
189200

190201
* Carefully review the changes that copier made to your project.
191202
* If you used a cruft/cookiecutter template before, you may delete the cruft file `.cruft.json`.
@@ -200,16 +211,20 @@ You can also change the project by providing different answers to the questions
200211
To update your project with changes from the template and to reconfigure your project options, run:
201212

202213
```shell
203-
copier update --trust --skip-tasks
214+
copier update --trust
204215
```
205216

206217
To do a pure update without re-configuration run:
207218

208219
```shell
209-
copier update --trust --skip-tasks --skip-answered
220+
copier update --trust --skip-answered
210221
```
211222

212-
If you initialized the project from a non-default branch, you must add `--vcs-ref branch-name` also to the update commands.
223+
If you initialized the project from a non-default branch, you must add the git branch name (or tag name) also to the update commands:
224+
225+
```shell
226+
copier update --trust --vcs-ref branch-or-tag-name --skip-answered
227+
```
213228

214229
When updating, Copier will do its best to respect the project evolution by using the answers provided last time.
215230
However, sometimes this is impossible and conflicts occur.

0 commit comments

Comments
 (0)