Skip to content

Commit 89a5bed

Browse files
committed
markit include directory with file name on line one item 2 close #39
1 parent 1569246 commit 89a5bed

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

markit

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
2-
# markit 3.119.272 2018-10-18T14:04:48-05:00 (CDT) https://github.com/BradleyA/markit uadmin six-rpi3b.cptx86.com 3.118
3-
# markit include directory with file name on line one item 2 testing #39
2+
# markit 3.120.273 2018-10-18T14:36:15-05:00 (CDT) https://github.com/BradleyA/markit uadmin six-rpi3b.cptx86.com 3.119
3+
# markit include directory with file name on line one item 2 close #39
44
#
55
###
66
# I created this script because Git fails me when it comes to including a
@@ -133,7 +133,9 @@ if [ "$1" != "no" ] && [ "$1" != "normal" ] && [ "$1" != "all" ] && [ "$1" != ""
133133
exit 0
134134
fi
135135

136-
# Change directory to top level git directory to include directory with ${FILE_NAME} on line one item 2 #39
136+
# Change to top level git directory to include it with ${FILE_NAME} on line one item 2 #39
137+
# By changing ${FILE_NAME} to include the directory, all the information
138+
# is available to find ${FILE_NAME}'s location in GitHub or GitLab repository
137139
cd $(git rev-parse --show-toplevel)
138140

139141
# Create FILE_LIST, remove deleted files from FILE_LIST
@@ -260,17 +262,21 @@ for FILE_NAME in ${FILE_LIST} ; do
260262
git add ${FILE_NAME}
261263
done
262264
echo ${NORMAL}
265+
263266
# Commit staged file(s) for Git push
264267
git commit -m "${FILE_MESSAGE}"
268+
265269
# If new release number, include git tag before git push
266270
if ! [ "${FILE_RELEASE}" == "${CURRENT_RELEASE}" ] ; then
267271
git tag -a ${FILE_RELEASE} -m "${FILE_MESSAGE}"
272+
268273
# Push changes to GitHub repository or GitLab project
269274
git push --follow-tags || { echo -e "\n${NORMAL}${0} ${LINENO} [${BOLD}ERROR${NORMAL}]:\n\tIf invalid username or password message then enter the following\n\tcommand to complete pushing marked file(s) with the correcet password;\n\t\t'${BOLD}git push --follow-tags${NORMAL}'\n\tIf markit failed to push because the repository contains other work\n\tthat is not in your local clone. Then enter the following\n\tcommands to pull the other changes and push your marked file(s);\n\t\t${BOLD}'git pull'\n\t\t'git push --follow-tags${NORMAL}'" ; exit 1; }
270275
else
271276
# Push changes to GitHub repository or GitLab project
272277
git push || { echo -e "\n${NORMAL}${0} ${LINENO} [${BOLD}ERROR${NORMAL}]:\n\tIf invalid username or password message then enter the following\n\tcommand to complete pushing marked file(s) with the correcet password;\n\t\t'${BOLD}git push${NORMAL}'\n\tIf markit failed to push because the repository contains other work\n\tthat is not in your local clone. Then enter the following\n\tcommands to pull the other changes and push your marked file(s);\n\t\t${BOLD}'git pull'\n\t\t'git push${NORMAL}'" ; exit 1; }
273278
fi
279+
274280
#
275281
get_date_stamp ; echo -e "${NORMAL}${DATE_STAMP} ${0} ${SCRIPT_VERSION} ${LINENO} ${BOLD}[INFO]${NORMAL} ${LOCALHOST} ${USER} ${USER_ID} ${GROUP_ID} Done." 1>&2
276282
###

0 commit comments

Comments
 (0)