mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 16:51:05 -05:00
remove space
This commit is contained in:
parent
33f020ae4d
commit
f88db68011
2 changed files with 32 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
# Globals #
|
# Globals #
|
||||||
###########
|
###########
|
||||||
GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # GitHub Workspace
|
GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # GitHub Workspace
|
||||||
|
GITHUB_SHA="${GITHUB_SHA}" # Sha used to create this branch
|
||||||
TEST_FOLDER='.automation/test' # Folder where test are stored
|
TEST_FOLDER='.automation/test' # Folder where test are stored
|
||||||
CLEAN_FOLDER='.automation/automation' # Folder to rename to prevent skip
|
CLEAN_FOLDER='.automation/automation' # Folder to rename to prevent skip
|
||||||
|
|
||||||
|
@ -142,6 +143,31 @@ CleanTestDockerFiles() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
################################################################################
|
################################################################################
|
||||||
|
#### Function CleanSHAFolder ###################################################
|
||||||
|
CleanSHAFolder() {
|
||||||
|
info "-------------------------------------------------------"
|
||||||
|
info "Cleaning folder named:[${GITHUB_SHA}] if it exists"
|
||||||
|
|
||||||
|
##################
|
||||||
|
# Find the files #
|
||||||
|
##################
|
||||||
|
REMOVE_CMD=$(cd "${GITHUB_WORKSPACE}" || exit 1; rm -rf "${GITHUB_SHA}" 2>&1)
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Load the error code #
|
||||||
|
#######################
|
||||||
|
ERROR_CODE=$?
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# Check the shell for errors #
|
||||||
|
##############################
|
||||||
|
if [ $ERROR_CODE -ne 0 ]; then
|
||||||
|
# Error
|
||||||
|
error "ERROR! Failed to remove folder:[${GITHUB_SHA}]!"
|
||||||
|
fatal "ERROR:[${REMOVE_CMD}]"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
################################################################################
|
||||||
#### Function RenameTestFolder #################################################
|
#### Function RenameTestFolder #################################################
|
||||||
RenameTestFolder() {
|
RenameTestFolder() {
|
||||||
info "-------------------------------------------------------"
|
info "-------------------------------------------------------"
|
||||||
|
@ -184,6 +210,11 @@ CleanTestFiles
|
||||||
###############################
|
###############################
|
||||||
CleanTestDockerFiles
|
CleanTestDockerFiles
|
||||||
|
|
||||||
|
###############################
|
||||||
|
# Remove sha folder if exists #
|
||||||
|
###############################
|
||||||
|
CleanSHAFolder
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Re Name folder #
|
# Re Name folder #
|
||||||
##################
|
##################
|
||||||
|
|
Loading…
Reference in a new issue