Sha256: 52a338b55534be9a8d08690fa740db5ee9edacc6b578bae6d45b835b6e35c3d9

Contents?: true

Size: 630 Bytes

Versions: 3

Compression:

Stored size: 630 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2022-2024, 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

3 entries across 3 versions & 1 rubygems

Version Path
bake-modernize-0.32.0 bake/modernize/readme.rb
bake-modernize-0.31.0 bake/modernize/readme.rb
bake-modernize-0.30.0 bake/modernize/readme.rb