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
jinli gu
jsherp-java-test
Commits
5c43a675
Commit
5c43a675
authored
Dec 07, 2023
by
jinli gu
Browse files
Add new file
parent
43984022
Pipeline
#182
canceled with stage
Changes
1
Pipelines
1
Show 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 @
5c43a675
#!/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