Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.admin
Commits
56930c52
"README.md" did not exist on "cf31a6254e0a08a01a3d1877ce85cf4dfe34b6d3"
Commit
56930c52
authored
7 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Delete dav folder before recursive upload
parent
5125d40b
No related branches found
No related tags found
1 merge request
!63
Conda package based CI
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gitlab/functions.sh
+8
-5
8 additions, 5 deletions
gitlab/functions.sh
with
8 additions
and
5 deletions
gitlab/functions.sh
+
8
−
5
View file @
56930c52
...
@@ -147,11 +147,12 @@ dav_mkdir() {
...
@@ -147,11 +147,12 @@ dav_mkdir() {
if
[[
${
code
}
==
*
204
||
${
code
}
==
*
201
]]
;
then
if
[[
${
code
}
==
*
204
||
${
code
}
==
*
201
]]
;
then
log_info
"curl: mkdir
${
DOCSERVER
}
/
${
1
}
"
log_info
"curl: mkdir
${
DOCSERVER
}
/
${
1
}
"
# if the return code was not a success, the function should usually treat it as an error.
# if the return code was not a success, the function should usually treat it
# however, sometimes the codes must be treated more flexibly, e.g.:
# as an error. however, sometimes the codes must be treated more flexibly,
# dav_recursive_mkdir wants the directory created *or* already existing,
# e.g.: dav_recursive_mkdir wants the directory created *or* already
# which means that a 405 (directory already exists) should not be treated as an error.
# existing, which means that a 405 (directory already exists) should not be
# other codes may also have similar consideration in the future.
# treated as an error. other codes may also have similar consideration in
# the future.
elif
[[
"
${
code
}
"
==
"
$2
"
]]
;
then
elif
[[
"
${
code
}
"
==
"
$2
"
]]
;
then
return
"
${
code
}
"
return
"
${
code
}
"
else
else
...
@@ -221,6 +222,8 @@ dav_upload_folder() {
...
@@ -221,6 +222,8 @@ dav_upload_folder() {
exit
1
exit
1
fi
fi
dav_delete
"
${
2
}
"
find
"
$1
"
|
while
read
-r
fname
;
do
find
"
$1
"
|
while
read
-r
fname
;
do
# replace the local path prefix ('../folder1/folder2/folder-to-upload/')
# replace the local path prefix ('../folder1/folder2/folder-to-upload/')
# with the server path prefix ('private-upload/docs/test/')
# with the server path prefix ('private-upload/docs/test/')
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment