add file verifications

This commit is contained in:
Kevin Redon 2014-03-02 16:16:54 +01:00
parent cac93a9351
commit 7ca9fd345a
1 changed files with 4 additions and 2 deletions

View File

@ -5,13 +5,15 @@ require 'rake/clean'
# =================
# main name used if filename
target = IO.read("name").chomp
target = IO.read("name").split("\n")[0]
raise "define project name in 'name' file" unless target
# schema
sch = "#{target}.sch"
# pcb layout
pcb = "#{target}.pcb"
# project version, read from "version" file
version = IO.read("version").chomp
version = IO.read("version").split("\n")[0]
raise "define project version in 'version' file" unless version
# current date for stamping output
date = Time.now.strftime("%Y-%m-%d")
# schematic revision, based on the number of schematic commits)