Skip to content

Commit 34ba1b7

Browse files
committed
publish_edition: just check that we are on master
1 parent 66cec42 commit 34ba1b7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

publish_edition.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ git show "$known_good_commit" >/dev/null 2>&1 ||
2727
die "$known_good_commit not found" \
2828
"we need to be in a repo cloned from $repo_url"
2929

30+
cur_branch=$(git rev-parse --abbrev-ref HEAD)
31+
test "$cur_branch" = "master" || die "please switch to the 'master' branch"
32+
3033
test -d "$src_dir" || die "no source '$src_dir' directory"
3134

3235
test -d "$dst_dir" || die "no destination '$dst_dir' directory"
@@ -55,11 +58,6 @@ next_month=$(LANG=C date "+%B %Y")
5558
prev_month=$(LANG=C date --date="$today - 1 month" "+%B %Y")
5659

5760

58-
# If needed make sure we are up-to-date
59-
60-
git checkout master
61-
git pull horigin master
62-
6361
# Publish current draft
6462

6563
git mv "$src_dir"/edition-$cur.md "$dst_dir"/$today-edition-$cur.markdown

0 commit comments

Comments
 (0)