axvm / cake Goto Github PK
View Code? Open in Web Editor NEWCake is a powerful and flexible Make-like utility tool. Make Tasks Great Again!
License: MIT License
Cake is a powerful and flexible Make-like utility tool. Make Tasks Great Again!
License: MIT License
I've been using cake to define some db-related tasks, and I've been wanting to do this rake
style i.e.: cake db:migrate
however if I define a task like task "db:migrate"
cake will strip out the inner :
character. Would be great if this worked out of the box in lieu of multi-word task names.
it seems to detect the crystal compiler path: Crystal compiler path is /usr/bin/crystal
But then it fails at the end with: Crystal-lang compiler not found (Cake::Exceptions::CrystalEvalFailed)
Cake debug mode ENABLED
Cakefile processing
Cakefile processing completed
<import start>
[]
<import end>
<code start>
["LIB_NAME = \"mpv-crystal-simple-plugin.so\"", "PLUGIN_ENTRY_FILE = \"./src/simple-plugin.cr\"", "task :default do", " invoke! :lib", "end", "#task :lib, deps: [\"./src/simple-plugin.cr\"]", "task :lib do", " link_command = `crystal build --cross-compile \#{PLUGIN_ENTRY_FILE}`", " unless $? == 0", " exit 1", " end", " `\#{link_command} -shared -o \#{LIB_NAME}`", "end", "task :clean do", " `rm -f *.o`", " `rm -f \#{LIB_NAME}`", "end", "task :re do", " invoke! :clean", " invoke! :default", "end"]
<code end>
Crystal compiler path is /usr/bin/crystal
<script start>
require "../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../home/lesell_b/.cake/src/cake"
extend Cake::DSL
require "colorize"
task :default do
puts "\nHello there!".colorize(:light_green)
puts "This is default task :)\n".colorize(:light_gray)
print "Thank you for using ".colorize(:white)
print "Cake~!\n".colorize(:light_cyan)
print "You can override this task in your ".colorize(:white)
print "Cakefile".colorize(:light_cyan)
print " i.e:\n\n".colorize(:white)
print " task ".colorize(:light_cyan); print ":".colorize(:light_red); print "default ".colorize(:light_cyan); print "do\n".colorize(:light_magenta);
print " puts".colorize(:light_blue); print " \"Like that!\"\n".colorize(:light_green)
puts " end".colorize(:light_magenta)
end
LIB_NAME = "mpv-crystal-simple-plugin.so"
PLUGIN_ENTRY_FILE = "./src/simple-plugin.cr"
task :default do
invoke! :lib
end
#task :lib, deps: ["./src/simple-plugin.cr"]
task :lib do
link_command = `crystal build --cross-compile #{PLUGIN_ENTRY_FILE}`
unless $? == 0
exit 1
end
`#{link_command} -shared -o #{LIB_NAME}`
end
task :clean do
`rm -f *.o`
`rm -f #{LIB_NAME}`
end
task :re do
invoke! :clean
invoke! :default
end
begin
invoke!("lib")
rescue ex : Cake::Exceptions::TaskNotFound
print "ERROR:".colorize(:white).on_red
print " task "; print ":lib".colorize(:white); print " not defined.\n"
rescue e
print "ERROR:".colorize(:white).on_red
print " #{e.message}"
end
<script end>
Ouput is
Exit code is 1
Crystal-lang compiler not found (Cake::Exceptions::CrystalEvalFailed)
Failed to raise an exception: END_OF_STACK
[0x461506] *CallStack::print_backtrace:Int32 +118
[0x445426] __crystal_raise +86
[0x44fce8] ???
[0x481e65] *File#initialize<String, String, Int32, Nil, Nil>:(Event::Event | Nil) +213
[0x481d64] *File::new<String, String, Int32, Nil, Nil>:File +212
[0x458b8a] *CallStack::read_dwarf_sections:(Array(Tuple(UInt64, UInt64, String)) | Nil) +106
[0x4588cd] *CallStack::decode_line_number<UInt64>:Tuple(String | Nil, Int32, Int32) +45
[0x458404] *CallStack#decode_backtrace:Array(String) +164
[0x458342] *CallStack#printable_backtrace:Array(String) +50
[0x4814cd] *Exception+ +77
[0x481135] *Exception+ +117
[0x4545de] main +158
[0x7f357873e43a] __libc_start_main +234
[0x443b8a] _start +42
[0x0] ???
This would be really nice to have.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.