We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a38828 commit ba53cbdCopy full SHA for ba53cbd
1 file changed
.circleci/build-cli.sh
@@ -2,12 +2,22 @@
2
3
echo "Cloning CLI repo"
4
cd ~
5
-git clone https://github.com/snyk/cli.git
+# If the CLI repo doesn't exist (due to caching), clone it
6
+if [ ! -d "~/cli" ]; then
7
+ echo "Cloning CLI repo"
8
+ git clone https://github.com/snyk/cli.git
9
+else
10
+ echo "CLI repo already exists from cache"
11
+fi
12
+
13
cd cli
14
echo "Replacing snyk-docker-plugin dependency with SHA $CIRCLE_SHA1"
15
sed -iE "s/\"snyk-docker-plugin\": \".*\",/\"snyk-docker-plugin\": \"git:\/\/github.com\/snyk\/snyk-docker-plugin.git#$CIRCLE_SHA1\",/" package.json
16
17
sudo npm i -g npm@7
18
19
echo "Running npm install"
20
npm i
21
22
echo "Running build"
23
npm run build
0 commit comments