Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Self-apply template and explain how
Browse files Browse the repository at this point in the history
  • Loading branch information
yajo committed Jan 15, 2021
1 parent 7aba978 commit 65aeb34
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .copier-answers.autopretty.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Changes here will be overwritten by Copier; do NOT edit manually
_commit: v0.1.0a7
_commit: v0.1.0a8
_src_path: .
ansible: true
biggest_kbs: 1000
github: true
js: true
protected_branches:
main_branches:
- main
python: true
17 changes: 7 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
language: fail
files: "\\.rej$"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.1.2
rev: v2.2.1
hooks:
- id: prettier
additional_dependencies:
Expand All @@ -20,7 +20,7 @@ repos:
args:
- --plugin=@prettier/plugin-xml
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.8.1
rev: v7.17.0
hooks:
- id: eslint
verbose: true
Expand All @@ -39,21 +39,21 @@ repos:
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
rev: v2.7.4
hooks:
- id: pyupgrade
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
- repo: https://github.com/timothycrosley/isort
rev: 5.5.1
rev: 5.7.0
hooks:
- id: isort
args:
- --settings=.
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
rev: 3.8.4
hooks:
- &flake8
id: flake8
Expand All @@ -72,11 +72,11 @@ repos:
hooks:
- id: encryption-check
- repo: https://github.com/ansible/ansible-lint
rev: v4.3.5
rev: v4.3.7
hooks:
- id: ansible-lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v3.4.0
hooks:
- id: check-added-large-files
args:
Expand All @@ -94,9 +94,6 @@ repos:
- id: mixed-line-ending
args:
- --fix=lf
- id: no-commit-to-branch
args:
- --branch=main
- id: trailing-whitespace
- id: check-ast
- id: check-builtin-literals
Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,22 @@ latest code formatters and linters.

## Notes for template maintainers

This template is self-applied, but due to 🐔+🥚 problems, to update it, this must be
done manually:
This template is self-applied, and as you can imagine, there are some 🐔+🥚 situations.

```bash
cd autopretty
copier -a .copier-answers.autopretty.upstream.yml -f -d js=false -d main_branches=[main] . .
mv -f .github/workflows/pre-commit.yml .github/workflows/pre-commit.upstream.yml
```
To update it:

Not so nice, but neither so hard.
1. Publish a new release on Github
1. `git fetch --tags`
1. `copier -a .copier-answers.autopretty.yml --prereleases update`

In case you want to self-test a new release locally:

1. `git tag v0.1.0a99` ... or the version that you will release.
1. `copier -a .copier-answers.autopretty.yml --prereleases update`
1. Once you're happy: `git tag -d v0.1.0a99`
1. Open PR.
1. Merge it.
1. Release.
1. Do the proper update.

At some point, this should be automated easily.

0 comments on commit 65aeb34

Please sign in to comment.