Skip to content

Commit 4e0e7cc

Browse files
Prefix with '-- Conan Cache'
1 parent dab0d73 commit 4e0e7cc

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

restore.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,47 @@
33
INPUT_TARGET_OS=${INPUT_TARGET_OS:-$RUNNER_OS}
44
REPO_BRANCH=master
55

6-
echo "Conan Cache: $GITHUB_EVENT_NAME : Commit by $GITHUB_ACTOR with SHA $GITHUB_SHA on $GITHUB_REF"
7-
echo "Conan Cache: Using cache $INPUT_CACHE_NAME"
6+
echo "-- Conan Cache: $GITHUB_EVENT_NAME : Commit by $GITHUB_ACTOR with SHA $GITHUB_SHA on $GITHUB_REF"
7+
echo "-- Conan Cache: Using cache $INPUT_CACHE_NAME"
88

99
# Make sure path exists and change dir to it
1010
mkdir -p $CONAN_USER_HOME
1111
cd $CONAN_USER_HOME
1212

1313
# Check out cache
14-
echo "Conan Cache: Checking out at CONAN_USER_HOME: $CONAN_USER_HOME"
14+
echo "-- Conan Cache: Checking out at CONAN_USER_HOME: $CONAN_USER_HOME"
1515
git clone https://${INPUT_BOT_NAME}:${INPUT_BOT_TOKEN}@github.com/${INPUT_CACHE_NAME}.git ${CONAN_USER_HOME} --branch=master || exit 1
1616

17-
echo "Conan Cache: Enable long paths"
17+
echo "-- Conan Cache: Enable long paths"
1818
git config --global core.longpaths true
1919

2020
# Check if explicit key exits
21-
echo "Conan Cache: Trying explicit key $INPUT_KEY"
21+
echo "-- Conan Cache: Trying explicit key $INPUT_KEY"
2222
if [ $(git tag --list "$INPUT_KEY") ]; then
2323
# If it does - check out explicit and set cache_hit to 1
2424
git checkout ${INPUT_KEY} || exit 1
25-
echo "Conan Cache: replace CONAN_USER_HOME_SHORT with ${CONAN_USER_HOME_SHORT}"
25+
echo "-- Conan Cache: replace CONAN_USER_HOME_SHORT with ${CONAN_USER_HOME_SHORT}"
2626
find .conan/ -name .conan_link -exec perl -pi -e 's=CONAN_USER_HOME_SHORT=$ENV{CONAN_USER_HOME_SHORT}=g' {} +
2727
echo "::set-env name=cache-hit::1"
2828
else
2929
# If it doesn't check if fallback exits
3030
FALLBACK_KEY="host-${RUNNER_OS}-target-${INPUT_TARGET_OS}-${REPO_BRANCH}"
31-
echo "Conan Cache: Trying fallback key $FALLBACK_KEY"
31+
echo "-- Conan Cache: Trying fallback key $FALLBACK_KEY"
3232

3333
fallback_exists="$(git ls-remote origin $FALLBACK_KEY 2>/dev/null)"
3434

3535
if [ "$fallback_exists" ]; then
3636
# If it does - check out fallback and set cache_hit to 2
37-
echo "Conan Cache: Check out fallback key $FALLBACK_KEY"
37+
echo "-- Conan Cache: Check out fallback key $FALLBACK_KEY"
3838
git checkout ${FALLBACK_KEY} || exit 1
3939
git pull || exit 1
4040
git lfs pull || exit 1
41-
echo "Conan Cache: replace CONAN_USER_HOME_SHORT with ${CONAN_USER_HOME_SHORT}"
41+
echo "-- Conan Cache: replace CONAN_USER_HOME_SHORT with ${CONAN_USER_HOME_SHORT}"
4242
find .conan/ -name .conan_link -exec perl -pi -e 's=CONAN_USER_HOME_SHORT=$ENV{CONAN_USER_HOME_SHORT}=g' {} +
4343
echo "::set-env name=cache-hit::2"
4444
else
4545
# If it doesn't - create the branch and set cache_hit to 0
46-
echo "Conan Cache: Creating fallback key $FALLBACK_KEY"
46+
echo "-- Conan Cache: Creating fallback key $FALLBACK_KEY"
4747
git checkout -b ${FALLBACK_KEY} || exit 1
4848
git push -u origin ${FALLBACK_KEY} || exit 1
4949
echo "::set-env name=cache-hit::0"

0 commit comments

Comments
 (0)