pass variables as parameters t obash
parent
a2125541b4
commit
f4506f88c8
|
@ -1,19 +1,27 @@
|
||||||
def call(String repoDir, String maintainerName = "Qindel Opengnsys Team", String maintainerEmail = "opengnsys@qindel.com") {
|
def call(String repoDir, String maintainerName = "Qindel Opengnsys Team", String maintainerEmail = "opengnsys@qindel.com") {
|
||||||
script {
|
script {
|
||||||
sh """#!/bin/bash
|
sh """
|
||||||
|
#!/bin/bash
|
||||||
set -e # Detener la ejecución en caso de error
|
set -e # Detener la ejecución en caso de error
|
||||||
set -x # Mostrar los comandos que se ejecutan
|
set -x # Mostrar los comandos que se ejecutan
|
||||||
|
|
||||||
INPUT_FILE="\${repoDir}/CHANGELOG.md"
|
REPO_DIR="\$1"
|
||||||
OUTPUT_FILE="\${repoDir}/debian/changelog"
|
MAINTAINER_NAME="\$2"
|
||||||
|
MAINTAINER_EMAIL="\$3"
|
||||||
|
|
||||||
|
echo "📦 Generando changelog en formato Debian..."
|
||||||
|
echo "📦 Directorio del repositorio: \$REPO_DIR"
|
||||||
|
echo "📦 Nombre del mantenedor: \$MAINTAINER_NAME"
|
||||||
|
echo "📦 Correo del mantenedor: \$MAINTAINER_EMAIL"
|
||||||
|
|
||||||
|
|
||||||
|
INPUT_FILE="\${REPO_DIR}/CHANGELOG.md"
|
||||||
|
OUTPUT_FILE="\${REPO_DIR}/debian/changelog"
|
||||||
PACKAGE_NAME="oggui"
|
PACKAGE_NAME="oggui"
|
||||||
DISTRIBUTION="unstable"
|
DISTRIBUTION="unstable"
|
||||||
URGENCY="medium"
|
URGENCY="medium"
|
||||||
BUILD_NUMBER="\${BUILD_NUMBER:-1}" # Default en caso de no estar definido
|
BUILD_NUMBER="\${BUILD_NUMBER:-1}" # Default en caso de no estar definido
|
||||||
|
|
||||||
MAINTAINER_NAME="\${maintainerName}"
|
|
||||||
MAINTAINER_EMAIL="\${maintainerEmail}"
|
|
||||||
|
|
||||||
# Función para formatear la fecha correctamente en formato Debian
|
# Función para formatear la fecha correctamente en formato Debian
|
||||||
format_date() {
|
format_date() {
|
||||||
if date --version >/dev/null 2>&1; then
|
if date --version >/dev/null 2>&1; then
|
||||||
|
@ -58,6 +66,6 @@ def call(String repoDir, String maintainerName = "Qindel Opengnsys Team", String
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "✅ Changelog generado en formato Debian en \$OUTPUT_FILE."
|
echo "✅ Changelog generado en formato Debian en \$OUTPUT_FILE."
|
||||||
"""
|
""" script: true, args: [repoDir, maintainerName, maintainerEmail]
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue