Skip to content

Commit 680c15f

Browse files
committed
circle: Only reconcile git histories if CIRCLE_TAG is nonempty
No clue if this actually works, but it's kludgey anyways. Signed-off-by: Kristofer Rye <[email protected]>
1 parent 60a4737 commit 680c15f

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

.circleci/config.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,15 @@ jobs:
264264
- run:
265265
name: "Reconcile Git histories"
266266
command: |
267-
git checkout master
268-
git reset --hard origin/master
269-
git checkout "$CIRCLE_BRANCH"
270-
git reset --hard "origin/$CIRCLE_BRANCH"
267+
if [ -z "$CIRCLE_TAG" ];
268+
then
269+
git checkout master
270+
git reset --hard origin/master
271+
git checkout "$CIRCLE_BRANCH"
272+
git reset --hard "origin/$CIRCLE_BRANCH"
273+
else
274+
echo "CIRCLE_TAG was set, didn't do anything"
275+
fi
271276
- run: mkdir -p logs/
272277
- run: touch logs/build-status
273278
- run:
@@ -335,10 +340,15 @@ jobs:
335340
- run:
336341
name: "Reconcile Git histories"
337342
command: |
338-
git checkout master
339-
git reset --hard origin/master
340-
git checkout "$CIRCLE_BRANCH"
341-
git reset --hard "origin/$CIRCLE_BRANCH"
343+
if [ -z "$CIRCLE_TAG" ];
344+
then
345+
git checkout master
346+
git reset --hard origin/master
347+
git checkout "$CIRCLE_BRANCH"
348+
git reset --hard "origin/$CIRCLE_BRANCH"
349+
else
350+
echo "CIRCLE_TAG was set, didn't do anything"
351+
fi
342352
- run: mkdir -p logs/
343353
- run: touch logs/build-status
344354
- run:

0 commit comments

Comments
 (0)