Class: ChangelogHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/zapp_sdk_tasks/changelog_helper.rb

Class Method Summary collapse

Class Method Details

.generate_changelog(platform, version) ⇒ Object



4
5
6
7
8
# File 'lib/zapp_sdk_tasks/changelog_helper.rb', line 4

def self.generate_changelog(platform, version)
  install_changelog_maker
  init_changelog(platform, version)
  system "./node_modules/.bin/changelog-maker --all >> CHANGELOG.md"
end

.init_changelog(platform, version) ⇒ Object



14
15
16
17
18
# File 'lib/zapp_sdk_tasks/changelog_helper.rb', line 14

def self.init_changelog(platform, version)
  File.open("CHANGELOG.md", "w+") do |f|
    f.write("##{platform} SDK Version: #{version}\n\n")
  end
end

.install_changelog_makerObject



10
11
12
# File 'lib/zapp_sdk_tasks/changelog_helper.rb', line 10

def self.install_changelog_maker
  system "npm i changelog-maker"
end


20
21
22
23
24
25
# File 'lib/zapp_sdk_tasks/changelog_helper.rb', line 20

def self.print_success(platform, version)
  <<~HEREDOC
    Changelog uploaded!
    https://assets-production.applicaster.com/zapp/sdk_versions/#{platform}/#{version}/CHANGELOG.md"
  HEREDOC
end