Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Sergej Kostjucenko
cargo-contract
Commits
281b851c
Verified
Commit
281b851c
authored
Oct 27, 2020
by
Denis_P
🏑
Browse files
change (CI): do not look in the same dir
parent
f4cb2b06
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/pre_cache.sh
View file @
281b851c
...
...
@@ -10,10 +10,10 @@ set -u
function
prepopulate
{
if
[[
!
-d
$1
]]
;
then
mkdir
-p
"
/ci-cache/
$CI_PROJECT_NAME
/
$2
/
$CI_COMMIT_REF_NAME
/
$CI_JOB_NAME
"
;
mkdir
-p
"
$1
"
;
FRESH_CACHE
=
$(
find
"/ci-cache/
$CI_PROJECT_NAME
/
$2
"
-mindepth
2
-maxdepth
2
\
-type
d
-name
"
$CI_JOB_NAME
"
-exec
stat
--printf
=
"%Y
\t
%n
\n
"
{}
\;
|sort
-n
-r
|head
-1
|cut
-f2
)
;
if
[[
-d
$FRESH_CACHE
]]
;
then
-type
d
-name
"
$CI_JOB_NAME
"
-not
-path
"
$1
"
-exec
stat
--printf
=
"%Y
\t
%n
\n
"
{}
\;
|sort
-n
-r
|head
-1
|cut
-f2
)
;
if
[[
-d
"
$FRESH_CACHE
"
]]
;
then
echo
"____Using"
"
$FRESH_CACHE
"
"to prepopulate the cache____"
;
time cp
-r
"
$FRESH_CACHE
"
"
$1
"
;
else
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment