🔨 Mejora herramientas de liberación de versiones
This commit is contained in:
parent
c046014d04
commit
2da8bd6558
3 changed files with 26 additions and 11 deletions
|
|
@ -40,9 +40,18 @@ body = """
|
||||||
| replace(from="🍱 ", to="")
|
| replace(from="🍱 ", to="")
|
||||||
| replace(from="📝 ", to="")
|
| replace(from="📝 ", to="")
|
||||||
| replace(from="💡 ", to="")
|
| replace(from="💡 ", to="")
|
||||||
|
| replace(from="🎨 ", to="")
|
||||||
|
| replace(from="✅ ", to="")
|
||||||
|
| replace(from="🔨 ", to="")
|
||||||
|
| replace(from="💄 ", to="")
|
||||||
|
| replace(from="🔥 ", to="")
|
||||||
|
| replace(from="🚩 ", to="")
|
||||||
|
| replace(from="🚨 ", to="")
|
||||||
|
| replace(from="📄 ", to="")
|
||||||
|
| replace(from="🩹 ", to="")
|
||||||
-%}
|
-%}
|
||||||
|
|
||||||
- {{ msg | trim }} {% if commit.author.name != "Manuel Cillero" %} - {{ commit.author.name }}{% endif %}
|
- {{ msg | trim }}{% if commit.author.name != "Manuel Cillero" %} - {{ commit.author.name }}{% endif %}
|
||||||
{% endfor %}{% endfor %}
|
{% endfor %}{% endfor %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -53,6 +62,7 @@ topo_order_commits = true
|
||||||
sort_commits = "oldest"
|
sort_commits = "oldest"
|
||||||
|
|
||||||
commit_parsers = [
|
commit_parsers = [
|
||||||
|
{ message = "^🔖", skip = true },
|
||||||
{ message = "^✨", group = "Añadido" },
|
{ message = "^✨", group = "Añadido" },
|
||||||
{ message = "^🐛", group = "Corregido" },
|
{ message = "^🐛", group = "Corregido" },
|
||||||
{ message = "^🚑", group = "Corregido" },
|
{ message = "^🚑", group = "Corregido" },
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,5 +8,4 @@
|
||||||
**/local.*.toml
|
**/local.*.toml
|
||||||
**/local.toml
|
**/local.toml
|
||||||
.env
|
.env
|
||||||
.cargo
|
|
||||||
.vscode
|
.vscode
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,12 @@ set -euo pipefail
|
||||||
# Script para generar el archivo de cambios del crate indicado.
|
# Script para generar el archivo de cambios del crate indicado.
|
||||||
# Uso:
|
# Uso:
|
||||||
# ./tools/changelog.sh <crate> <version> [--stage]
|
# ./tools/changelog.sh <crate> <version> [--stage]
|
||||||
# Ejemplo:
|
# Ejemplos:
|
||||||
# ./tools/changelog.sh pagetop-macros 0.1.0 # Sólo genera archivo
|
# ./tools/changelog.sh pagetop-macros 0.1.0 # Sólo genera archivo
|
||||||
# ./tools/changelog.sh pagetop 0.1.0 --stage # Prepara archivo para commit
|
# ./tools/changelog.sh pagetop 0.1.0 --stage # Genera y prepara para commit
|
||||||
|
#
|
||||||
|
# El modo --stage lo invoca pre-release-hook de cargo-release desde release.sh
|
||||||
|
# para añadir el archivo de cambios al commit de liberación de la versión.
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Configuración
|
# Configuración
|
||||||
|
|
@ -103,23 +106,26 @@ else
|
||||||
fi
|
fi
|
||||||
git-cliff --unreleased "${COMMON_ARGS[@]}"
|
git-cliff --unreleased "${COMMON_ARGS[@]}"
|
||||||
echo "CHANGELOG generated at '$CHANGELOG_FILE'"
|
echo "CHANGELOG generated at '$CHANGELOG_FILE'"
|
||||||
|
echo ""
|
||||||
|
|
||||||
# Pregunta por la revisión del archivo de cambios generado
|
# Permite revisar (y editar) el archivo de cambios antes de continuar
|
||||||
echo "Do you want to review the changelog before continuing? [y/N]"
|
read -r -p "Do you want to review the changelog before continuing? [y/N] " REPLY
|
||||||
read -r REPLY
|
echo ""
|
||||||
if [[ "$REPLY" =~ ^[Yy]$ ]]; then
|
if [[ "$REPLY" =~ ^[Yy]$ ]]; then
|
||||||
${EDITOR:-nano} "$CHANGELOG_FILE"
|
${EDITOR:-nano} "$CHANGELOG_FILE"
|
||||||
fi
|
fi
|
||||||
echo "Do you want to proceed with the release of $CRATE? [y/N]"
|
|
||||||
read -r REPLY
|
# Confirmación antes de proceder con la publicación
|
||||||
echo
|
read -r -p "Do you want to proceed with the release of $CRATE? [y/N] " REPLY
|
||||||
|
echo ""
|
||||||
if [[ ! "$REPLY" =~ ^[Yy]$ ]]; then
|
if [[ ! "$REPLY" =~ ^[Yy]$ ]]; then
|
||||||
echo "Aborting release process." >&2
|
echo "Aborting release process." >&2
|
||||||
|
git restore --worktree -- .
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Si hay cambios y procede, añade al stage (cargo-release hará el commit)
|
# Si hay cambios y procede, añade al stage (cargo-release hará el commit)
|
||||||
if [[ -n $(git status --porcelain -- "$CHANGELOG_FILE") ]]; then
|
if [[ -n "$(git status --porcelain -- "$CHANGELOG_FILE")" ]]; then
|
||||||
if [[ "$STAGE" == "--stage" ]]; then
|
if [[ "$STAGE" == "--stage" ]]; then
|
||||||
git add "$CHANGELOG_FILE"
|
git add "$CHANGELOG_FILE"
|
||||||
echo "Staged $CHANGELOG_FILE for commit"
|
echo "Staged $CHANGELOG_FILE for commit"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue