Skip to content

Commit

Permalink
[build] create all:lint rake task to execute both format script and p…
Browse files Browse the repository at this point in the history
…ython tox
  • Loading branch information
titusfortner committed Jun 20, 2024
1 parent dbea695 commit 8db7b64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,12 @@ namespace :all do
@git.push if %w[y yes].include?(response)
end

task :lint do
ext = /mswin|msys|mingw|cygwin|bccwin|wince|emc/.match?(RbConfig::CONFIG['host_os']) ? 'ps1' : 'sh'
sh "./scripts/format.#{ext}", verbose: true
Rake::Task['py:lint'].invoke
end

desc 'Update everything in preparation for a release'
task :prepare, [:version, :channel] do |_task, arguments|
chrome_channel = arguments[:channel] || 'Stable'
Expand Down Expand Up @@ -1252,7 +1258,7 @@ end

def update_changelog(version, language, path, changelog, header)
tag = previous_tag(version, language)
log = `git --no-pager log #{tag}...HEAD --pretty=format:">>> %B" --reverse #{path}`
log = `git --no-pager log #{tag}...HEAD --pretty=format:"--> %B" --reverse #{path}`
commits = log.split('>>>').map { |entry|
lines = entry.split("\n")
lines.reject! { |line| line.match?(/^(----|Co-authored|Signed-off)/) || line.empty? }
Expand Down

0 comments on commit 8db7b64

Please sign in to comment.