Skip to content

Commit

Permalink
changed to github-pages hosted release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
czechboy0 committed Feb 3, 2016
1 parent a4b9653 commit 54f1f3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Xcode
#
build/
gh-pages/
*.pbxuser
!default.pbxuser
*.mode1v3
Expand Down
15 changes: 11 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,25 @@ end

private_lane :sparkle do |params|

# Checkout the github-pages branch of buildasaur if we don't already have it
sh "git clone https://github.com/czechboy0/Buildasaur.git --branch gh-pages --single-branch gh-pages" unless Dir.exists? "./gh-pages"

# Create release notes file
release_notes_html = render_github_markdown(
context_repository: "czechboy0/Buildasaur",
api_token: ENV["GITHUB_TOKEN"],
markdown_contents: params[:release_description]
)
release_notes_html_path = File.absolute_path("../Meta/Sparkle_Release_Notes/#{params[:release_version_tag]}.html")
release_notes_html_path = File.absolute_path("../gh-pages/Sparkle_Release_Notes/#{params[:release_version_tag]}.html")
File.open(release_notes_html_path, "w") { |io| io.write(release_notes_html) }
# Now we need to commit this new file at the end of the workflow!
sh "cd .. && git add '#{release_notes_html_path}'"
# Commit and push the changes
Dir.chdir("gh-pages") do
sh "git add ."
sh "git commit -m 'Added the release notes for #{version}.'"
sh "git push"
end

release_notes_html_url = "https://raw.githubusercontent.com/czechboy0/Buildasaur/master/Meta/Sparkle_Release_Notes/#{params[:release_version_tag]}.html"
release_notes_html_url = "https://honzadvorsky.com/Buildasaur/Sparkle_Release_Notes/#{params[:release_version_tag]}.html"
app_download_url = "https://github.com/czechboy0/Buildasaur/releases/download/#{params[:release_version_tag]}/Buildasaur.app.zip"

UI.message "Successfully created release notes file at path #{release_notes_html_path}"
Expand Down

0 comments on commit 54f1f3c

Please sign in to comment.