Sha256: ffd925b3189f3050319dc1c5999310b765d22b4c2f17b5d661ea450597f9a0c6

Contents?: true

Size: 625 Bytes

Versions: 43

Compression:

Stored size: 625 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022, by Samuel Williams.

require 'bake/modernize'
require 'build/files/system'

def readme
	update(root: Dir.pwd)
end

def update(root:)
	update_filenames(root)
end

private

def update_filenames(root)
	root = Build::Files::Path.new(root)
	md_files = root.glob("*.md")

	# Move all .yml files to .yaml files :)
	md_files.each do |path|
		new_path = path.with(basename: path.basename.downcase)

		unless new_path == path
			Console.logger.info(self, "Moving #{path} to #{new_path}...")
			system("git", "mv", "-f", path, new_path)
		end
	end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
bake-modernize-0.29.0 bake/modernize/readme.rb
bake-modernize-0.28.0 bake/modernize/readme.rb
bake-modernize-0.27.3 bake/modernize/readme.rb
bake-modernize-0.27.2 bake/modernize/readme.rb
bake-modernize-0.27.1 bake/modernize/readme.rb
bake-modernize-0.27.0 bake/modernize/readme.rb
bake-modernize-0.26.0 bake/modernize/readme.rb
bake-modernize-0.25.0 bake/modernize/readme.rb
bake-modernize-0.24.0 bake/modernize/readme.rb
bake-modernize-0.23.0 bake/modernize/readme.rb
bake-modernize-0.22.0 bake/modernize/readme.rb
bake-modernize-0.21.0 bake/modernize/readme.rb
bake-modernize-0.20.0 bake/modernize/readme.rb
bake-modernize-0.19.4 bake/modernize/readme.rb
bake-modernize-0.19.3 bake/modernize/readme.rb
bake-modernize-0.19.2 bake/modernize/readme.rb
bake-modernize-0.19.1 bake/modernize/readme.rb
bake-modernize-0.19.0 bake/modernize/readme.rb
bake-modernize-0.18.0 bake/modernize/readme.rb
bake-modernize-0.17.8 bake/modernize/readme.rb