mirror of
https://codeberg.org/superseriousbusiness/gotosocial.git
synced 2024-12-21 08:31:53 +03:00
ec325fee14
* [chore] Update a bunch of database dependencies * fix lil thing
18 lines
455 B
Ruby
18 lines
455 B
Ruby
require "erb"
|
|
|
|
rule '.go' => '.go.erb' do |task|
|
|
erb = ERB.new(File.read(task.source))
|
|
File.write(task.name, "// Do not edit. Generated from #{task.source}\n" + erb.result(binding))
|
|
sh "goimports", "-w", task.name
|
|
end
|
|
|
|
generated_code_files = [
|
|
"pgtype/int.go",
|
|
"pgtype/int_test.go",
|
|
"pgtype/integration_benchmark_test.go",
|
|
"pgtype/zeronull/int.go",
|
|
"pgtype/zeronull/int_test.go"
|
|
]
|
|
|
|
desc "Generate code"
|
|
task generate: generated_code_files
|