Commit 626bb5bb authored by Evaryont's avatar Evaryont

Fix article task by re-adding latest_post

parent c3bcac1f
Pipeline #4 failed with stage
in 2 minutes and 21 seconds
......@@ -36,6 +36,10 @@ task :article do
# And run middleman
sh "bundle exec middleman article --edit #{Shellwords.escape(title_string)}"
# Then find the latest post, by looking for a file with the latest creation
# time.
latest_post = Dir['source/posts/*'].map{|f| [f, File.stat(f)] }.sort_by{|s| s[1].ctime}.last[0]
system("git add #{latest_post}")
system("git commit -m 'New Post: #{title_string}'")
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment