Skip to content

Commit 02023b0

Browse files
authored
Merge pull request #118 from basecamp/modernize-scripts
Create release first
2 parents d4a1328 + af81a4c commit 02023b0

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

bin/release

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,20 @@ on(:local) do
4545
end
4646
end
4747

48-
announcing "Tagging as #{VERSION}" do
48+
announcing "Creating GitHub release v#{VERSION}..." do
49+
notes_file = "tmp/release_notes.md"
50+
4951
on(:local) do
50-
execute :git, :fetch, :origin, "--tags"
52+
execute :mkdir, "-p", "tmp"
5153

52-
unless system "git tag -a v#{VERSION} -m 'Version #{VERSION}\n\n- list important changes here' -e"
53-
abort "Failed to create tag; check that the version doesn't already exist"
54-
end
54+
File.write(notes_file, "# What's Changed\n\n- \n")
55+
system ENV["EDITOR"] || "vim", notes_file
5556

56-
unless test :git, :push, "--tags"
57-
abort "Failed to push tag; check that the version doesn't already exist"
57+
unless system "gh", "release", "create", "v#{VERSION}", "--notes-file", notes_file
58+
abort "Failed to create release; check that the version doesn't already exist"
5859
end
59-
end
60-
end
6160

62-
announcing "Creating GitHub release..." do
63-
on(:local) do
64-
execute :gh, :release, :create, "v#{VERSION}", "--notes-from-tag"
61+
execute :rm, notes_file
6562
end
6663
end
6764

0 commit comments

Comments
 (0)