Compare commits

..

No commits in common. "master" and "2023.8.25-stable.1621.af9c7e6" have entirely different histories.

7 changed files with 15 additions and 58 deletions

View File

@ -1,31 +1,6 @@
<a name="unreleased"></a> <a name="unreleased"></a>
## [Unreleased] ## [Unreleased]
### Bug Fixes
- **install:** correctly inject tools dir into gitignore
### Documentation
- **tutorials:** fix obsolete link
<a name="2023.8.25-stable.1621.af9c7e6"></a>
## [2023.8.25-stable.1621.af9c7e6] - 2023-08-25
_Nothing functionally significant._
<a name="2023.8.25-stable.1617.35625f6"></a>
## [2023.8.25-stable.1617.35625f6] - 2023-08-25
### Documentation
- add changelog link in readme
### Features
- **changelog:** display message in changelog when no commit is selected in release
<a name="2023.8.25-stable.1609.4d31268"></a>
## [2023.8.25-stable.1609.4d31268] - 2023-08-25
_Nothing functionally significant._
<a name="2023.8.25-stable.1606.be97e77"></a> <a name="2023.8.25-stable.1606.be97e77"></a>
## [2023.8.25-stable.1606.be97e77] - 2023-08-25 ## [2023.8.25-stable.1606.be97e77] - 2023-08-25
@ -43,8 +18,6 @@ _Nothing functionally significant._
<a name="2023.8.24-stable.1827.fa2dab5"></a> <a name="2023.8.24-stable.1827.fa2dab5"></a>
## [2023.8.24-stable.1827.fa2dab5] - 2023-08-24 ## [2023.8.24-stable.1827.fa2dab5] - 2023-08-24
_Nothing functionally significant._
<a name="2023.8.24-stable.1827.1978504"></a> <a name="2023.8.24-stable.1827.1978504"></a>
## [2023.8.24-stable.1827.1978504] - 2023-08-24 ## [2023.8.24-stable.1827.1978504] - 2023-08-24
### Bug Fixes ### Bug Fixes
@ -58,8 +31,6 @@ _Nothing functionally significant._
<a name="2023.8.23-stable.1615.1b5c364"></a> <a name="2023.8.23-stable.1615.1b5c364"></a>
## [2023.8.23-stable.1615.1b5c364] - 2023-08-23 ## [2023.8.23-stable.1615.1b5c364] - 2023-08-23
_Nothing functionally significant._
<a name="2023.8.23-stable.1615.0545812"></a> <a name="2023.8.23-stable.1615.0545812"></a>
## [2023.8.23-stable.1615.0545812] - 2023-08-23 ## [2023.8.23-stable.1615.0545812] - 2023-08-23
### Bug Fixes ### Bug Fixes
@ -81,10 +52,7 @@ _Nothing functionally significant._
- initial commit - initial commit
[Unreleased]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.25-stable.1621.af9c7e6...HEAD [Unreleased]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.25-stable.1606.be97e77...HEAD
[2023.8.25-stable.1621.af9c7e6]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.25-stable.1617.35625f6...2023.8.25-stable.1621.af9c7e6
[2023.8.25-stable.1617.35625f6]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.25-stable.1609.4d31268...2023.8.25-stable.1617.35625f6
[2023.8.25-stable.1609.4d31268]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.25-stable.1606.be97e77...2023.8.25-stable.1609.4d31268
[2023.8.25-stable.1606.be97e77]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.24-stable.1827.fa2dab5...2023.8.25-stable.1606.be97e77 [2023.8.25-stable.1606.be97e77]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.24-stable.1827.fa2dab5...2023.8.25-stable.1606.be97e77
[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.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.24-stable.1827.1978504]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.23-stable.1615.1b5c364...2023.8.24-stable.1827.1978504

View File

@ -16,7 +16,7 @@ Tâches [Make](https://fr.wikipedia.org/wiki/Make) génériques à utiliser de p
# Inclure les lignes suivantes: # Inclure les lignes suivantes:
.mktools: mktools:
rm -rf .mktools rm -rf .mktools
curl -q https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/install.sh | $(SHELL) curl -q https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/install.sh | $(SHELL)
@ -26,7 +26,7 @@ Tâches [Make](https://fr.wikipedia.org/wiki/Make) génériques à utiliser de p
2. Synchroniser le répertoire des tâches 2. Synchroniser le répertoire des tâches
```shell ```shell
make .mktools make mktools
``` ```
3. Vous pouvez commencer à utiliser les tâches Make partagées ! 3. Vous pouvez commencer à utiliser les tâches Make partagées !
@ -38,7 +38,7 @@ 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-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-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-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/project-version.md](./doc/tasks/project-version.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 ## Tutoriels

View File

@ -21,5 +21,5 @@ MKT_GITEA_RELEASE_BODY ?= My new release
# Exécution de la tâche mkt-gitea-release en passant la liste # Exécution de la tâche mkt-gitea-release en passant la liste
# des fichiers à téléverser avec la nouvelle version publiée # des fichiers à téléverser avec la nouvelle version publiée
my-release: my-release:
$(MAKE) MKT_GITEA_RELEASE_ATTACHMENTS="$$(find dist/* -type f -printf '%p ')" mkt-gitea-release $(MAKE) MKT_GITEA_RELEASE_ATTACHMENTS=$$(find dist/* -type f) mkt-gitea-release
``` ```

View File

@ -1,6 +1,6 @@
# Générer une release pour son projet # Générer une release pour son projet
Afin de générer une release pour votre projet ([exemples](https://forge.cadoles.com/Cadoles/mktools/releases)) ainsi que le fichier `CHANGELOG.md` associé à votre historique Git, vous pouvez intégrer à votre `Makefile` les tâches suivantes: Afin de générer une release pour votre projet (exemple: https://forge.cadoles.com/Cadoles/mktools/releases/tag/2023.8.23-stable.1545.643e170) ainsi que le fichier `CHANGELOG.md` associé à votre historique Git, vous pouvez intégrer à votre `Makefile` les tâches suivantes:
```makefile ```makefile
MKT_GITEA_RELEASE_ORG ?= MyOrg # Propriétaire (organisation ou utilsateur) du projet Gitea MKT_GITEA_RELEASE_ORG ?= MyOrg # Propriétaire (organisation ou utilsateur) du projet Gitea

View File

@ -3,7 +3,7 @@
set -e set -e
TASKS_DIR=".mktools" TASKS_DIR=".mktools"
TASKS="${TASKS:-webdav gitea changelog version checkmake}" TASKS_FILES="webdav gitea changelog version checkmake"
main() { main() {
echo "Creating directory '$TASKS_DIR/'" echo "Creating directory '$TASKS_DIR/'"
@ -11,7 +11,7 @@ main() {
mkdir -p "$TASKS_DIR" mkdir -p "$TASKS_DIR"
# Download each referenced task files in $TASKS_DIR # Download each referenced task files in $TASKS_DIR
for f in $TASKS; do for f in $TASKS_FILES; do
echo "Downloading file '$TASKS_DIR/$f.mk'" echo "Downloading file '$TASKS_DIR/$f.mk'"
curl -qo "$TASKS_DIR/$f.mk" "https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/tasks/$f.mk" curl -qo "$TASKS_DIR/$f.mk" "https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/tasks/$f.mk"
done done
@ -20,7 +20,7 @@ main() {
if [ ! -f .gitignore ]; then if [ ! -f .gitignore ]; then
touch .gitignore touch .gitignore
fi fi
grep -qFx -- "$TASKS_DIR/" .gitignore || echo -e "$TASKS_DIR/" >> .gitignore grep -qF -- "$TASKS_DIR/" ".gitignore" || echo "$TASKS_DIR/" >> ".gitignore"
echo "Done" echo "Done"
} }

View File

@ -9,16 +9,6 @@ MKT_GITEA_RELEASE_ATTACHMENTS ?=
MKT_GITEA_RELEASE_USERNAME ?= MKT_GITEA_RELEASE_USERNAME ?=
MKT_GITEA_RELEASE_PASSWORD ?= MKT_GITEA_RELEASE_PASSWORD ?=
define GITEA_RELEASE_BODY
$(MKT_GITEA_RELEASE_BODY)
endef
export GITEA_RELEASE_BODY
define GITEA_RELEASE_ATTACHMENTS
$(MKT_GITEA_RELEASE_ATTACHMENTS)
endef
export GITEA_RELEASE_ATTACHMENTS
mkt-gitea-release: tools/gitea-release/bin/gitea-release.sh mkt-gitea-release: tools/gitea-release/bin/gitea-release.sh
GITEA_RELEASE_PROJECT="$(MKT_GITEA_RELEASE_PROJECT)" \ GITEA_RELEASE_PROJECT="$(MKT_GITEA_RELEASE_PROJECT)" \
GITEA_RELEASE_ORG="$(MKT_GITEA_RELEASE_ORG)" \ GITEA_RELEASE_ORG="$(MKT_GITEA_RELEASE_ORG)" \
@ -27,6 +17,8 @@ mkt-gitea-release: tools/gitea-release/bin/gitea-release.sh
GITEA_RELEASE_NAME="$(MKT_GITEA_RELEASE_VERSION)" \ GITEA_RELEASE_NAME="$(MKT_GITEA_RELEASE_VERSION)" \
GITEA_RELEASE_COMMITISH_TARGET="$(MKT_GITEA_RELEASE_COMMIT_TARGET)" \ GITEA_RELEASE_COMMITISH_TARGET="$(MKT_GITEA_RELEASE_COMMIT_TARGET)" \
GITEA_RELEASE_IS_DRAFT="$(MKT_GITEA_RELEASE_IS_DRAFT)" \ GITEA_RELEASE_IS_DRAFT="$(MKT_GITEA_RELEASE_IS_DRAFT)" \
GITEA_RELEASE_BODY="$(MKT_GITEA_RELEASE_BODY)" \
GITEA_RELEASE_ATTACHMENTS="$(MKT_GITEA_RELEASE_ATTACHMENTS)" \
GITEA_RELEASE_USERNAME="$(MKT_GITEA_RELEASE_USERNAME)" \ GITEA_RELEASE_USERNAME="$(MKT_GITEA_RELEASE_USERNAME)" \
GITEA_RELEASE_PASSWORD="$(MKT_GITEA_RELEASE_PASSWORD)" \ GITEA_RELEASE_PASSWORD="$(MKT_GITEA_RELEASE_PASSWORD)" \
tools/gitea-release/bin/gitea-release.sh tools/gitea-release/bin/gitea-release.sh

View File

@ -1,5 +1,5 @@
MKT_PROJECT_VERSION_TIMEZONE ?= Europe/Paris MKT_PROJECT_VERSION_TIMEZONE ?= Europe/Paris
MKT_PROJECT_VERSION_BRANCH_NAME ?= $(if $(CI), $(BRANCH_NAME), $(shell git rev-parse --abbrev-ref HEAD)) 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_VERSION_CLEANED_BRANCH_NAME ?= $(shell echo $(MKT_PROJECT_VERSION_BRANCH_NAME) | tr '[:upper:]' '[:lower:]' | sed -e 's/[-_ ]//g')
ifeq ($(MKT_PROJECT_VERSION_CLEANED_BRANCH_NAME),master) ifeq ($(MKT_PROJECT_VERSION_CLEANED_BRANCH_NAME),master)
@ -18,18 +18,15 @@ else ifneq ($(filter $(MKT_PROJECT_VERSION_CHANNEL),testing staging),)
else ifneq ($(filter $(MKT_PROJECT_VERSION_CHANNEL),stable master),) else ifneq ($(filter $(MKT_PROJECT_VERSION_CHANNEL),stable master),)
MKT_PROJECT_SHORT_VERSION_CHANNEL ?= stb MKT_PROJECT_SHORT_VERSION_CHANNEL ?= stb
else else
MKT_PROJECT_SHORT_VERSION_CHANNEL ?= $(MKT_PROJECT_VERSION_CHANNEL) MKT_PROJECT_SHORT_VERSION_CHANNEL ?= $(shell echo "$(MKT_PROJECT_VERSION_CHANNEL)" | sed -e 's/[aeiouy]//g' | cut -c1-3)
endif endif
MKT_PROJECT_VERSION_COMMIT_TIMESTAMP ?= $(shell git show -s --format=%ct) 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_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_TIMESTAMP ?= $(shell TZ=$(MKT_PROJECT_VERSION_TIMEZONE) 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_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) MKT_PROJECT_SHORT_VERSION ?= $(MKT_PROJECT_VERSION_DATE)-$(MKT_PROJECT_SHORT_VERSION_CHANNEL).$(MKT_PROJECT_VERSION_TIMESTAMP)
export MKT_PROJECT_VERSION
export MKT_PROJECT_SHORT_VERSION
.PHONY: mkt-project-version .PHONY: mkt-project-version
mkt-project-version: mkt-project-version: