File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ today=$(date "+%Y-%m-%d")
57
57
next_month=$( LANG=C date " +%B %Y" )
58
58
prev_month=$( LANG=C date --date=" $today - 1 month" " +%B %Y" )
59
59
60
-
61
60
# Publish current draft
62
61
63
62
git mv " $src_dir " /edition-$cur .md " $dst_dir " /$today -edition-$cur .markdown
@@ -68,7 +67,13 @@ git commit -m "Publish rn-$cur in $dst_dir/"
68
67
69
68
git cherry-pick " $last_draft_commit "
70
69
71
- git mv " $src_dir " /edition-$cur .md " $src_dir " /edition-$next .md
70
+ cur_ed=" $src_dir /edition-$cur .md"
71
+ next_ed=" $src_dir /edition-$next .md"
72
+
73
+ test -f " $cur_ed " || die " cannot find '$cur_ed '"
74
+
75
+ git mv " $cur_ed " " $next_ed " ||
76
+ die " failed to 'git mv $cur_ed $next_ed '"
72
77
73
78
add_order_suffix () {
74
79
perl -e '
@@ -95,7 +100,7 @@ perl -pi -e "
95
100
s/$today /$nextdate /g;
96
101
s/$prev_month /$next_month /g;
97
102
98
- " " $src_dir " /edition- $next .md
103
+ " " $next_ed "
99
104
100
- git commit --amend -m " Add draft for rn-$next " " $src_dir " /edition- $cur .md " $src_dir " /edition- $next .md
105
+ git commit --amend -m " Add draft for rn-$next " " $cur_ed " " $next_ed "
101
106
You can’t perform that action at this time.
0 commit comments