Compare commits

..

No commits in common. "2023.8.25-stable.1606.be97e77" and "2023.8.24-stable.1827.fa2dab5" have entirely different histories.

5 changed files with 9 additions and 54 deletions

View File

@ -1,32 +1,6 @@
<a name="unreleased"></a>
## [Unreleased]
### Bug Fixes
- **version:** normalize variable names
### Documentation
- describe project-version tasks
### Features
- **changelog:** allow override of command arguments
- **version:** permit branch name overwrite
<a name="2023.8.24-stable.1827.fa2dab5"></a>
## [2023.8.24-stable.1827.fa2dab5] - 2023-08-24
<a name="2023.8.24-stable.1827.1978504"></a>
## [2023.8.24-stable.1827.1978504] - 2023-08-24
### Bug Fixes
- **install:** add missing tasks in install script
### Features
- **changelog:** skip unreleased section if no commits are associated
- **version:** use commit timestamp to generate project version
<a name="2023.8.23-stable.1615.1b5c364"></a>
## [2023.8.23-stable.1615.1b5c364] - 2023-08-23
<a name="2023.8.23-stable.1615.0545812"></a>
## [2023.8.23-stable.1615.0545812] - 2023-08-23
@ -49,8 +23,5 @@
- initial commit
[Unreleased]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.24-stable.1827.fa2dab5...HEAD
[2023.8.24-stable.1827.fa2dab5]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.24-stable.1827.1978504...2023.8.24-stable.1827.fa2dab5
[2023.8.24-stable.1827.1978504]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.23-stable.1615.1b5c364...2023.8.24-stable.1827.1978504
[2023.8.23-stable.1615.1b5c364]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.23-stable.1615.0545812...2023.8.23-stable.1615.1b5c364
[Unreleased]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.23-stable.1615.0545812...HEAD
[2023.8.23-stable.1615.0545812]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.23-stable.1207.cd2f1ba...2023.8.23-stable.1615.0545812

View File

@ -38,7 +38,6 @@ Tâches [Make](https://fr.wikipedia.org/wiki/Make) génériques à utiliser de p
|`make mkt-webdav-upload`|Téléverser un fichier dans un répertoire WebDAV (Nextcloud)|[Voir ./doc/tasks/webdav.md](./doc/tasks/webdav.md)|
|`make mkt-gitea-release`|Créer une release sur un projet Gitea et téléverser des fichiers attachés|[Voir ./doc/tasks/gitea.md](./doc/tasks/gitea.md)|
|`make mkt-changelog`|Générer un fichier de `CHANGELOG.md` pour votre projet|[Voir ./doc/tasks/changelog.md](./doc/tasks/changelog.md)|
|`make mkt-project-version`|Générer et afficher la version courante du projet|[Voir ./doc/tasks/changelog.md](./doc/tasks/project-version.md)|
## Tutoriels

View File

@ -1,13 +0,0 @@
# Tâches "Project Version"
## Variables `MKT_PROJECT_VERSION` et `MKT_PROJECT_SHORT_VERSION`
Les variables `MKT_PROJECT_VERSION` et `MKT_PROJECT_SHORT_VERSION` sont automatiquement valuées à la version courante du projet tel que défini dans ["R14. Respecter le schéma d'identification des images publiées"](https://forge.cadoles.com/CadolesKube/KubeRules/wiki/Bonnes-pratiques-de-d%C3%A9veloppement-applicatif-en-vue-d%27un-d%C3%A9ploiement-sur-Kubernetes#r14-respecter-le-sch%C3%A9ma-d-identification-des-images-publi%C3%A9es).
## `make mkt-project-version`
La tâche `make mkt-project-version` affiche sur la sortie standard la version courante du projet.
## `make mkt-project-short-version`
La tâche `make mkt-project-short-version` affiche sur la sortie standard la version courte courante du projet.

View File

@ -1,6 +1,6 @@
MKT_GIT_CHGLOG_VERSION ?= 0.15.4
MKT_GIT_CHGLOG_DOWNLOAD_URL ?= https://github.com/git-chglog/git-chglog/releases/download/v$(MKT_GIT_CHGLOG_VERSION)/git-chglog_$(MKT_GIT_CHGLOG_VERSION)_linux_amd64.tar.gz
MKT_GIT_CHGLOG_ARGS ?= --output CHANGELOG.md
MKT_GIT_CHGLOG_ARGS ?=
MKT_GIT_CHGLOG_PROJECT_ORG ?=
export MKT_GIT_CHGLOG_PROJECT_ORG
MKT_GIT_CHGLOG_PROJECT_NAME ?=
@ -96,7 +96,7 @@ endef
export MKT_GIT_CHGLOG_TEMPLATE_SCRIPT = $(value _MKT_GIT_CHGLOG_TEMPLATE_SCRIPT)
mkt-changelog: tools/git-chglog/bin/git-chglog .chglog/config.yml .chglog/CHANGELOG.tpl.md
tools/git-chglog/bin/git-chglog $(MKT_GIT_CHGLOG_ARGS)
tools/git-chglog/bin/git-chglog --output CHANGELOG.md $(MKT_GIT_CHGLOG_ARGS)
.chglog/config.yml:
@eval "$$MKT_GIT_CHGLOG_CONFIG_SCRIPT"

View File

@ -1,13 +1,11 @@
MKT_PROJECT_VERSION_TIMEZONE ?= Europe/Paris
MKT_PROJECT_VERSION_BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
MKT_PROJECT_VERSION_CLEANED_BRANCH_NAME ?= $(shell echo $(MKT_PROJECT_VERSION_BRANCH_NAME) | tr '[:upper:]' '[:lower:]' | sed -e 's/[-_ ]//g')
MKT_PROJECT_BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD | tr '[:upper:]' '[:lower:]' | sed -e 's/[-_ ]//g')
ifeq ($(MKT_PROJECT_VERSION_CLEANED_BRANCH_NAME),master)
ifeq ($(MKT_PROJECT_BRANCH_NAME),master)
MKT_PROJECT_VERSION_CHANNEL = stable
else ifeq ($(MKT_PROJECT_VERSION_CLEANED_BRANCH_NAME),staging)
else ifeq ($(MKT_PROJECT_BRANCH_NAME),staging)
MKT_PROJECT_VERSION_CHANNEL = testing
else
MKT_PROJECT_VERSION_CHANNEL = $(MKT_PROJECT_VERSION_CLEANED_BRANCH_NAME)
MKT_PROJECT_VERSION_CHANNEL = $(MKT_PROJECT_BRANCH_NAME)
endif
@ -22,8 +20,8 @@ else
endif
MKT_PROJECT_VERSION_COMMIT_TIMESTAMP ?= $(shell git show -s --format=%ct)
MKT_PROJECT_VERSION_DATE ?= $(shell TZ=$(MKT_PROJECT_VERSION_TIMEZONE) date -d '@$(MKT_PROJECT_VERSION_COMMIT_TIMESTAMP)' +%Y.%-m.%-d)
MKT_PROJECT_VERSION_TIMESTAMP ?= $(shell TZ=$(MKT_PROJECT_VERSION_TIMEZONE) date -d '@$(MKT_PROJECT_VERSION_COMMIT_TIMESTAMP)' +%-H%M)
MKT_PROJECT_VERSION_DATE ?= $(shell TZ=Europe/Paris date -d '@$(MKT_PROJECT_VERSION_COMMIT_TIMESTAMP)' +%Y.%-m.%-d)
MKT_PROJECT_VERSION_TIMESTAMP ?= $(shell TZ=Europe/Paris date -d '@$(MKT_PROJECT_VERSION_COMMIT_TIMESTAMP)' +%-H%M)
MKT_PROJECT_VERSION ?= $(MKT_PROJECT_VERSION_DATE)-$(MKT_PROJECT_VERSION_CHANNEL).$(MKT_PROJECT_VERSION_TIMESTAMP).$(shell git rev-parse --short HEAD)
MKT_PROJECT_SHORT_VERSION ?= $(MKT_PROJECT_VERSION_DATE)-$(MKT_PROJECT_SHORT_VERSION_CHANNEL).$(MKT_PROJECT_VERSION_TIMESTAMP)