From 924d138200e0d99b454749789a4f83de02c23e1b Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sat, 22 Feb 2020 10:35:16 +0900 Subject: [PATCH 1/2] Cleanup forumla --- iblinter.rb | 18 ------------------ utils/formula.rb | 32 -------------------------------- utils/replace_bottle_sha256.rb | 20 -------------------- 3 files changed, 70 deletions(-) delete mode 100644 iblinter.rb delete mode 100644 utils/formula.rb delete mode 100644 utils/replace_bottle_sha256.rb diff --git a/iblinter.rb b/iblinter.rb deleted file mode 100644 index f81791f..0000000 --- a/iblinter.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Iblinter < Formula - desc "A linter tool for Interface Builder" - homepage "https://github.com/IBDecodable/IBLinter" - url "https://github.com/IBDecodable/IBLinter.git", - :tag => "0.4.20", - :revision => "4b518dafbd64a329374f285c5f27bc6c08be7a38" - head "https://github.com/IBDecodable/IBLinter.git" - - bottle do - root_url "https://github.com/IBDecodable/IBLinter/releases/download/0.4.20" - cellar :any_skip_relocation - sha256 "bd17fde9063d89aca76923bc88a65fbff283b867b20c3a16dc078372df061f21" => :mojave - end - - def install - system "make", "install", "PREFIX=#{prefix}" - end -end diff --git a/utils/formula.rb b/utils/formula.rb deleted file mode 100644 index 752790f..0000000 --- a/utils/formula.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Formula - class << self - def bottle(&block) - @bottle ||= Bottle.new - @bottle.instance_eval(&block) - end - - def method_missing(method, *args); end - - def to_hash - { - 'bottle': @bottle.to_hash - } - end - end - class Bottle - def sha256(hash) - @sha256 ||= {} - hash.each do |k, v| - @sha256[v] = k - end - end - - def method_missing(method, *args); end - - def to_hash - { - 'sha256': @sha256 - } - end - end -end diff --git a/utils/replace_bottle_sha256.rb b/utils/replace_bottle_sha256.rb deleted file mode 100644 index acba195..0000000 --- a/utils/replace_bottle_sha256.rb +++ /dev/null @@ -1,20 +0,0 @@ -require_relative "formula.rb" - -formula_path = Dir.pwd + "/" + ARGV[0] -new_sha256 = ARGV[1] -os_version = ARGV[2] - -require_relative formula_path - -formulae = [] -ObjectSpace.each_object(Formula.singleton_class) do |klass| - next if klass == Formula - formulae.push(klass) -end - -formula = formulae[0] -old_sha256 = formula.to_hash[:bottle][:sha256][os_version.to_sym] - -formula_content = File.read(formula_path) -formula_content.gsub!(old_sha256, new_sha256) -File.write(formula_path, formula_content) From 438484c24e3df4504800ba39149eb08e197f8876 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sat, 22 Feb 2020 10:36:00 +0900 Subject: [PATCH 2/2] Create tap_migrations.json --- tap_migrations.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tap_migrations.json diff --git a/tap_migrations.json b/tap_migrations.json new file mode 100644 index 0000000..2163f54 --- /dev/null +++ b/tap_migrations.json @@ -0,0 +1,3 @@ +{ + "iblinter": "homebrew/core" +}