[RUBY] 8th class: rake

Reference site

Chart type ruby-appendix-IV (rake)

rake

As mentioned in the README.org, it requires a lot of commands just to program on Github. rake remembers those commands so that they can be executed with one command. Let rake do the sharing to github. First, fill in the task in the Rakefile. First, create the file.

emacs -nw Rakefile

Write the following to the resulting file.

desc 'git push'
task :push do
  p comm = "git add -A"
  system comm
  p comm = "git commit -m 'hoge hoge'"
  system comm
  p comm = "git pull origin main"
  system comm
  p comm = "git push origin main"
  system comm
  exit
end

The above program will work if you type push and the command (should).

note

Master programmers don't remember commands, they write down or simplify things they might forget. Something like rake is like an example.


Recommended Posts

8th class: rake
10th class: Recursion
5th class: Output
7th class: if, else
6th class: Variables, method
5th
6th
6th
Rake
9th
7th
11th
9th
7th
11th
10th
10th
Anonymous class (anonymous class)
Special Lecture on Multi-Scale Simulation: 11th (class)
Class method
ObjectMapper class
ArrayList class