Skip to content

Commit d3a79db

Browse files
committed
build(publish.sh): do not error when tmp/code.angularjs.org already exists
I'm not sure what's the best way to update the shallow repo and I'm in a state where there is nothing to be updated so I'll revisit the proper fix the next time I'm doing a release unless someone beats me to it. Closes angular#5872
1 parent e891bae commit d3a79db

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tools/code.angularjs.org/publish.sh

+17-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,23 @@ function init {
2626

2727
function prepare {
2828

29-
echo "-- Cloning code.angularjs.org"
30-
git clone git@github.com:angular/code.angularjs.org.git $REPO_DIR --depth=1
29+
30+
31+
if [ -d "$REPO_DIR" ]; then
32+
# TODO(i): it's not clear how to safely fetch and update a shallow clone
33+
# I'll need to test this during the next release
34+
echo "-- TODO: Update code.angularjs.org repo at $REPO_DIR"
35+
echo "-- TODO: if pushing the 'publish' action fails, rebase the repo manually and push"
36+
echo "-- TODO: or delete $REPO_DIR and rerun the prepare and publish steps"
37+
#cd $REPO_DIR
38+
#git fetch --update-shallow origin
39+
#git checkout master
40+
#git merge --ff-only origin/master
41+
#cd -
42+
else
43+
echo "-- Cloning code.angularjs.org into $REPO_DIR"
44+
git clone git@github.com:angular/code.angularjs.org.git $REPO_DIR --depth=1
45+
fi
3146

3247
echo "-- Updating code.angularjs.org"
3348

0 commit comments

Comments
 (0)