Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Administrator
mall4cloud
Commits
ff823594
Commit
ff823594
authored
Dec 20, 2023
by
Administrator
Browse files
Add new file
parent
35722619
Pipeline
#250
failed with stage
in 1 minute and 9 seconds
Changes
1
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
getCommittedFiles.sh
getCommittedFiles.sh
+27
-0
No files found.
getCommittedFiles.sh
0 → 100644
View file @
ff823594
#!/bin/bash
function
build
()
{
local
-a
COMMITTED_FILES
COMMITTED_FILES
=
$(
git diff
--name-only
--diff-filter
=
DCM
$CI_COMMIT_SHA
origin/
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
)
if
[
-z
"
$COMMITTED_FILES
"
]
;
then
return
fi
local
-a
check_files
for
dir
in
$COMMITTED_FILES
;
do
if
[[
$dir
=
~
${
JAVA_SUFFIX
}
]]
;
then
if
[[
$dir
=
~
${
JAVA_MAIN_SOURCE
}
]]
;
then
#如果不是 则跳过剩下的步骤
check_files+
=(
"
$REPOSITORY_FULL_PATH
/"
${
dir
}
)
fi
else
check_files+
=(
"
$REPOSITORY_FULL_PATH
/"
${
dir
}
)
fi
done
if
[
-z
"
$check_files
"
]
;
then
return
fi
S
=
$(
IFS
=
' '
;
echo
"
${
check_files
[*]
}
"
)
echo
$S
}
build
"
$@
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment