aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKing Kévin <kingkevin@cuvoodoo.info>2017-12-22 16:51:19 +0100
committerKing Kévin <kingkevin@cuvoodoo.info>2017-12-22 16:51:19 +0100
commit8a6831465d2ae2fd474c4ac2bb2b5819493c56c0 (patch)
tree3adf32533ff260da3aaac47703443b424eafcead
parentf9db55110c15ef7819c42355cee53594ddde640c (diff)
Rakefile: use last commit date in schematic and layout
-rw-r--r--Rakefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 67175f5..122c53b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -10,6 +10,7 @@ require 'open_uri_redirections' # allow redirections
require 'net/http' # to get sites
require 'nokogiri' # to parse sites
require 'json' # to parse get site responses
+require 'date' # to parse dates
# =================
# project variables
@@ -38,6 +39,7 @@ names.each do |name|
rev = `git log --pretty=oneline "#{sch}" "#{pcb}" | wc -l`.chomp.to_i
sch_rev = rev
pcb_rev = rev
+ date = Date.parse(`git log -1 --format=%cd "#{sch}" "#{pcb}"`)
# get schematic and layout revision numbers, based on the respective number of commits
# this allows to have independent number in case an edit in one does not affect the other, but you need to keep track of which revision numbers correspond
#sch_rev = `git log --pretty=oneline "#{sch}" | wc -l`.chomp.to_i