Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
NBprojekt authored Jan 20, 2021
1 parent 04e0b8f commit 93a4cdf
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,33 @@ else
fi

# Set start and stop date if empty
printf "\n>\n> Check if start and end date is set\n"
if [ "${INPUT_GOURCE_START_DATE}" = "" ]; then
# // TODO: This needs some attention when used with multiple repos
cd ./git_repo
printf "\n> \tStart date is empty\n"
first_commit=git rev-list --max-parents=0 HEAD
echo "First commit: $first_commit"
echo $(git show -s --format=%cd --date=short $first_commit)
export INPUT_GOURCE_START_DATE=$(git show -s --format=%cd --date=short $first_commit)
printf "\n> \tSet start date to: $INPUT_GOURCE_START_DATE\n"
cd ..
else
printf "\n> \tStart date is set to: $INPUT_GOURCE_START_DATE\n"
fi
if [ "${INPUT_GOURCE_STOP_DATE}" = "" ]; then
# // TODO: This needs some attention when used with multiple repos
cd ./git_repo
printf "\n> \tEnd date is empty\n"
last_commit=git rev-parse HEAD
echo "last commit: $last_commit"
echo $(git show -s --format=%cd --date=short $last_commit)
export INPUT_GOURCE_STOP_DATE=$(git show -s --format=%cd --date=short $last_commit)
printf "\n> \tSet end date to: $INPUT_GOURCE_STOP_DATE\n"
cd ..
else
printf "\n> \tEnd date is set to: $INPUT_GOURCE_STOP_DATE\n"
fi
#printf "\n>\n> Check if start and end date is set\n"
#if [ "${INPUT_GOURCE_START_DATE}" = "" ]; then
# # // TODO: This needs some attention when used with multiple repos
# cd ./git_repo
# printf "\n> \tStart date is empty\n"
# first_commit=git rev-list --max-parents=0 HEAD
# echo "First commit: $first_commit"
# echo $(git show -s --format=%cd --date=short $first_commit)
# export INPUT_GOURCE_START_DATE=$(git show -s --format=%cd --date=short $first_commit)
# printf "\n> \tSet start date to: $INPUT_GOURCE_START_DATE\n"
# cd ..
#else
# printf "\n> \tStart date is set to: $INPUT_GOURCE_START_DATE\n"
#fi
#if [ "${INPUT_GOURCE_STOP_DATE}" = "" ]; then
# # // TODO: This needs some attention when used with multiple repos
# cd ./git_repo
# printf "\n> \tEnd date is empty\n"
# last_commit=git rev-parse HEAD
# echo "last commit: $last_commit"
# echo $(git show -s --format=%cd --date=short $last_commit)
# export INPUT_GOURCE_STOP_DATE=$(git show -s --format=%cd --date=short $last_commit)
# printf "\n> \tSet end date to: $INPUT_GOURCE_STOP_DATE\n"
# cd ..
#else
# printf "\n> \tEnd date is set to: $INPUT_GOURCE_STOP_DATE\n"
#fi

# Set proper env variables if we have a logo.
printf "\n>\n> Logo check"
Expand Down

0 comments on commit 93a4cdf

Please sign in to comment.