fix(release): améliore la procédure de release
Parent
0befa3add0
révision
4a9e1bc533
3
Makefile
3
Makefile
|
@ -117,6 +117,9 @@ install-deps: ## installe les dépendances de l'application
|
|||
migrate: ## mets à jour le schéma de la base de données
|
||||
$(PYTHON) manage.py migrate
|
||||
|
||||
check-migrations: ## teste la cohérence des migrations et du code
|
||||
$(PYTHON) manage.py makemigrations --check --noinput --dry-run
|
||||
|
||||
static: ## collecte les fichiers statiques
|
||||
ifeq ($(ENV), production)
|
||||
@echo "Collecte des fichiers statiques..."
|
||||
|
|
51
README.md
51
README.md
|
@ -224,7 +224,7 @@ The following tasks are then available:
|
|||
- `npm run styleguide`: run a server with the styleguide and watch for file
|
||||
changes.
|
||||
- `npm run serve`: run a proxy server to the app - which must already be served on
|
||||
`localhost:8000` - with the styleguide on `/stylguide` and watch for file
|
||||
`localhost:8000` - with the styleguide on `/styleguide` and watch for file
|
||||
changes.
|
||||
- `npm run lint`: lint the JavaScript and the SCSS code.
|
||||
|
||||
|
@ -237,14 +237,26 @@ growing repository due to the minified files.
|
|||
Before releasing one should verify that `make test` and `make lint` are ok.
|
||||
Migrations should also have been added during development process.
|
||||
|
||||
Then:
|
||||
0. Define VERSION
|
||||
### Hygienic checklist
|
||||
|
||||
export VERSION="x.y.z"
|
||||
make test
|
||||
make lint
|
||||
npm run lint
|
||||
make check-migrations
|
||||
git grep '\<print\s*(\|pdb\>\|\<set_trace\>' '*.py'
|
||||
|
||||
1. Fork from develop branch:
|
||||
### Release gitmnastic
|
||||
|
||||
git switch -c release_$VERSION
|
||||
0. Define variables
|
||||
|
||||
export VERSION="x.y.z" # version to be released
|
||||
export ORIGIN="origin" # remote name for pushing my origin
|
||||
export UPSTREAM="cliss21" # remote name for pushing upstream
|
||||
export GITEA_USER="jdoe" # my forge username
|
||||
|
||||
1. Fork from the develop branch:
|
||||
|
||||
git checkout -b release_$VERSION
|
||||
|
||||
2. Build and commit statics
|
||||
|
||||
|
@ -258,33 +270,42 @@ Then:
|
|||
|
||||
4. Edit and commit it
|
||||
|
||||
$EDITOR CHANGELOG.md
|
||||
/usr/bin/editor CHANGELOG.md
|
||||
git add boiteaasso/__init__.py CHANGELOG.md
|
||||
git commit -m "doc(CHANGELOG): publie la v$VERSION"
|
||||
|
||||
5. Tag your commit
|
||||
5. Tag your release commit
|
||||
|
||||
git tag v$VERSION
|
||||
|
||||
6. Merge in master
|
||||
6. Merge it in master
|
||||
|
||||
git push --set-upstream origin release_$VERSION
|
||||
git push --set-upstream $ORIGIN release_$VERSION
|
||||
git push --tags
|
||||
# then open a PR via
|
||||
# https://forge.cliss21.org/cliss21/boiteaasso/compare/master...<gitea_user>:release_$VERSION
|
||||
git push --tags cliss21
|
||||
xdg-open "https://forge.cliss21.org/cliss21/boiteaasso/compare/master...$GITEA_USER:release_$VERSION"
|
||||
# then get the PR merged
|
||||
git push --tags $UPSTREAM
|
||||
|
||||
### That's released. Now we prepare repo for a new develop sprint
|
||||
|
||||
7. Rebase develop on master
|
||||
|
||||
git fetch --all
|
||||
git checkout develop
|
||||
git rebase cliss21/master
|
||||
git rebase $UPSTREAM/master
|
||||
|
||||
8. Revert statics from develop
|
||||
|
||||
git revert $(git rev-list --all --max-count=1 boiteaasso/static/)
|
||||
git push
|
||||
# then open a PR or directly push to cliss21 repo
|
||||
git push $ORIGIN
|
||||
# then open a PR or not
|
||||
xdg-open "https://forge.cliss21.org/cliss21/boiteaasso/compare/develop...$GITEA_USER:develop"
|
||||
# then get the PR merged (or directly push via git push $UPSTREAM)
|
||||
|
||||
9. You should be ready for a new develop sprint
|
||||
|
||||
git fetch --all
|
||||
|
||||
## License
|
||||
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket