Skip to content

Commit

Permalink
added simpler versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil Maj committed Jul 26, 2011
1 parent 47f740f commit 6b60bd1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ require 'YAML'
require 'fileutils'

PROFILE_PATH = "util/profiles"

# TODO: print out build command line if no args provided.
version = open("VERSION").read.rstrip

def show_usage
STDERR.puts "\nusage: ./build [ profile=<name> ] [ --minify ] [ --generate-docs ]"
Expand Down Expand Up @@ -37,7 +36,7 @@ end
hash = YAML.load_file(File.join(PROFILE_PATH, profile) + ".js")

# clear previous file
target = hash["out"]
target = hash["out"] + "-" + version + ".js"
target_dir = File.dirname(target)

Dir.mkdir(target_dir) unless File.directory?(target_dir)
Expand All @@ -52,8 +51,8 @@ if extra
end

if minify
minified_filename = hash['out'].sub(/\.js$/, '.min.js')
`java -jar util/compiler.jar --js=#{ hash["out"] } \
minified_filename = target.sub(/\.js$/, '.min.js')
`java -jar util/compiler.jar --js=#{ target } \
--js_output_file=#{ minified_filename }`
end

Expand Down
2 changes: 1 addition & 1 deletion util/profiles/bb.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
out: "lib/xui-bb-2.2.0.js",
out: "lib/xui-bb",
include: [
"src/header",
"src/base",
Expand Down
2 changes: 1 addition & 1 deletion util/profiles/core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
out: "lib/xui-2.2.0.js",
out: "lib/xui",
include: [
"src/header",
"src/base",
Expand Down
2 changes: 1 addition & 1 deletion util/profiles/ie.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
out: "lib/xui-ie-2.2.0.js",
out: "lib/xui-ie",
include: [
"src/header",
"src/base",
Expand Down

0 comments on commit 6b60bd1

Please sign in to comment.