Loading bin/create-version-file.sh 0 → 100755 +34 −0 Original line number Diff line number Diff line #!/bin/bash set -e usage() { cat << EOF Script de génération du fichier de version. Usage : $0 <gitdir> <gitdir> : Chemin du répertoire des métadonnées git (.git), ou du dépôt git intermédiaire. Obligatoire. Exemples : $0 /workspace/sygal/.git EOF exit 0; } CURR_DIR=$(cd `dirname $0` && pwd) APPDIR=$(cd ${CURR_DIR}/.. && pwd) GITDIR=$1 [[ -z "$GITDIR" ]] && usage function generate_version_file() { GITDIR=$1 VERSION_CMD="git --git-dir ${GITDIR} describe" DATE_CMD="git --git-dir ${GITDIR} log --pretty='format:%ad' --date=format:'%d/%m/%Y %H:%M:%S' -1" echo "==> Génération du fichier de version..." ver_num=$(eval ${VERSION_CMD}) ver_date=$(eval ${DATE_CMD}) cd ${APPDIR} && ./create-version-config-file --number ${ver_num} --date ${ver_date} } generate_version_file $(realpath $GITDIR) create-version-config-file +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ if ($versionDate === null) { if ($configFilepath === null) { $configFilepath = DEFAULT_FILE_PATH; } $configFilepath = realpath($configFilepath); $config = [ 'unicaen-app' => [ Loading Loading
bin/create-version-file.sh 0 → 100755 +34 −0 Original line number Diff line number Diff line #!/bin/bash set -e usage() { cat << EOF Script de génération du fichier de version. Usage : $0 <gitdir> <gitdir> : Chemin du répertoire des métadonnées git (.git), ou du dépôt git intermédiaire. Obligatoire. Exemples : $0 /workspace/sygal/.git EOF exit 0; } CURR_DIR=$(cd `dirname $0` && pwd) APPDIR=$(cd ${CURR_DIR}/.. && pwd) GITDIR=$1 [[ -z "$GITDIR" ]] && usage function generate_version_file() { GITDIR=$1 VERSION_CMD="git --git-dir ${GITDIR} describe" DATE_CMD="git --git-dir ${GITDIR} log --pretty='format:%ad' --date=format:'%d/%m/%Y %H:%M:%S' -1" echo "==> Génération du fichier de version..." ver_num=$(eval ${VERSION_CMD}) ver_date=$(eval ${DATE_CMD}) cd ${APPDIR} && ./create-version-config-file --number ${ver_num} --date ${ver_date} } generate_version_file $(realpath $GITDIR)
create-version-config-file +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ if ($versionDate === null) { if ($configFilepath === null) { $configFilepath = DEFAULT_FILE_PATH; } $configFilepath = realpath($configFilepath); $config = [ 'unicaen-app' => [ Loading