adding more tests and cool logic

This commit is contained in:
Lucas Gravley 2020-08-13 12:40:21 -05:00
parent f72cd683d7
commit 999413d224
2 changed files with 17 additions and 2 deletions

View file

@ -0,0 +1,13 @@
FROM node:10
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install
COPY server.js server.js
EXPOSE 3000
CMD ["node", "server.js"]

View file

@ -79,11 +79,13 @@ function BuildFileList() {
FILE_TYPE=${FILE##*.}
# To lowercase
FILE_TYPE=${FILE_TYPE,,}
# get the baseFile for additonal logic
BASE_FILE=$(basename "${FILE,,}")
##############
# Print file #
##############
info "File:[${FILE}], File_type:[${FILE_TYPE}]"
info "File:[${FILE}], File_type:[${FILE_TYPE}], Base_file:[${BASE_FILE}]"
#########
# DEBUG #
@ -432,7 +434,7 @@ function BuildFileList() {
# Set the READ_ONLY_CHANGE_FLAG since this could be exec #
##########################################################
READ_ONLY_CHANGE_FLAG=1
elif [ "${FILE}" == "dockerfile" ] || [ "${FILE_TYPE}" == "dockerfile" ]; then
elif [ "${FILE_TYPE}" == "dockerfile" ] [ "${BASE_FILE}" == *"dockerfile."* ] ||; then
################################
# Append the file to the array #
################################