From f984cdbe9a679ff628de267e8a4661407f83eb26 Mon Sep 17 00:00:00 2001 From: Tortue Torche <126358-tortuetorche@users.noreply.gitlab.com> Date: Wed, 24 Jul 2019 14:07:32 +0200 Subject: [PATCH] Fix git log "warning: command substitution: ignored null byte in input" message See: https://stackoverflow.com/a/18187760 https://askubuntu.com/a/926695 --- scripts/push-to-gitlab-pages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/push-to-gitlab-pages.sh b/scripts/push-to-gitlab-pages.sh index 7b23223..fbd1ab2 100644 --- a/scripts/push-to-gitlab-pages.sh +++ b/scripts/push-to-gitlab-pages.sh @@ -28,7 +28,7 @@ repository_url_protocol=$(echo $CI_PROJECT_URL | sed -E 's/^(https?:\/\/).+$/\1/ repository_user=$GITLAB_WRITE_REPO_USER repository_password=$GITLAB_WRITE_REPO_TOKEN repository_url=${repository_url_protocol}${repository_user}:${repository_password}@${repository_url_path} -last_commit_message=$(git log -1 -z --format="%s%n%ncommit %H%nAuthor: %an <%ae>%nDate: %ad" HEAD) +last_commit_message=$(git log -1 -z --format="%s%n%ncommit %H%nAuthor: %an <%ae>%nDate: %ad" HEAD | tr '\0' '\n') if ! $(git clone --quiet --branch=$branch --single-branch $repository_url $repository_path); then # Create $branch if needed