update getting versions an fixed for fonts dir
This commit is contained in:
18
Rakefile
18
Rakefile
@@ -25,7 +25,7 @@ task :build => [:required] do
|
|||||||
|
|
||||||
if mode == "production"
|
if mode == "production"
|
||||||
targetDir = publicDir + "/lib"
|
targetDir = publicDir + "/lib"
|
||||||
pmUIFontsDir = targetDir + "/css/fonts"
|
pmUIFontsDir = targetDir + "/fonts"
|
||||||
else
|
else
|
||||||
targetDir = publicDir + "/lib-dev"
|
targetDir = publicDir + "/lib-dev"
|
||||||
pmUIFontsDir = pmUIDir + "/fonts"
|
pmUIFontsDir = pmUIDir + "/fonts"
|
||||||
@@ -112,7 +112,7 @@ def buildPmUi(homeDir, targetDir, mode)
|
|||||||
|
|
||||||
puts "\nCopying font files into: #{pmUIFontsDir}".bold
|
puts "\nCopying font files into: #{pmUIFontsDir}".bold
|
||||||
theme = "mafe"
|
theme = "mafe"
|
||||||
copyFiles({"#{homeDir}/themes/#{theme}/fonts/*" => "#{targetDir}"})
|
copyFiles({"#{homeDir}/themes/#{theme}/fonts/*" => "#{pmUIFontsDir}"})
|
||||||
|
|
||||||
puts "\nPMUI Build Finished".magenta
|
puts "\nPMUI Build Finished".magenta
|
||||||
end
|
end
|
||||||
@@ -169,10 +169,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
def getVersion(path)
|
def getVersion(path)
|
||||||
if File.exists? path + '/VERSION.txt'
|
version = ""
|
||||||
version = File.read path + '/VERSION.txt'
|
Dir.chdir(path) do
|
||||||
else
|
version = `rake version`
|
||||||
version = "(unknown)"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return version.strip
|
return version.strip
|
||||||
@@ -180,7 +179,11 @@ end
|
|||||||
|
|
||||||
|
|
||||||
def getHash(path)
|
def getHash(path)
|
||||||
hash = `git rev-parse --short HEAD`
|
hash = ""
|
||||||
|
Dir.chdir(path) do
|
||||||
|
hash = `git rev-parse --short HEAD`
|
||||||
|
end
|
||||||
|
|
||||||
return hash.strip
|
return hash.strip
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -309,3 +312,4 @@ class String
|
|||||||
def bold; "\033[1m#{self}\033[22m" end
|
def bold; "\033[1m#{self}\033[22m" end
|
||||||
def reverse_color; "\033[7m#{self}\033[27m" end
|
def reverse_color; "\033[7m#{self}\033[27m" end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user