Skip to content

Commit ca6a7af

Browse files
committed
The Rakefile produces built packages!
Also the docs refer to a working download link. Next step will be uploading the new packages
1 parent 04bb746 commit ca6a7af

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

README.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ elements, or in different projects.
77

88
For more information, see https://github.com/LRDesign/NinjaScript/wiki
99

10-
Or jump right in: download it at: https://github.com/downloads/LRDesign/NinjaScript/ninjascript.zip
10+
Or jump right in: download it at: [Downloads for Ninjascript](https://googledrive.com/host/0B3Pcyyb1e1BPT2pRX1ZIREdhSjQ/)
11+
1112

1213
## Contributing
1314

Rakefile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ SINON_DIR = File::join(BUILDTOOLS_DIR, "sinon")
1313
NPM_BIN = File::join(NODE_MODULES, ".bin")
1414
KARMA = File::join(NPM_BIN, "karma")
1515

16+
PACKAGE_CONFIG= {
17+
"VERSION" => "0.10",
18+
"BUILD_DATE" => Time.new.strftime("%m-%d-%Y"),
19+
"COPYRIGHT_YEAR" => Time.new.strftime("%Y")
20+
}
21+
1622
rule ".html" => [
1723
proc{|name| name.sub(/\.html\Z/, '.haml').sub(/\Adoc\//, 'doc-src/')}
1824
] do |t|
@@ -117,12 +123,6 @@ namespace :build do
117123
directory "auto-constants"
118124
directory "tmp"
119125

120-
PACKAGE_CONFIG= {
121-
"VERSION" => "0.10",
122-
"BUILD_DATE" => Time.new.strftime("%m-%d-%Y"),
123-
"COPYRIGHT_YEAR" => Time.new.strftime("%Y")
124-
}
125-
126126
task :constants => %w{auto-constants} do
127127
require 'yaml'
128128

@@ -191,13 +191,14 @@ namespace :build do
191191

192192
task :clobber => [:clobber_package]
193193

194+
package_name = "ninjascript-#{PACKAGE_CONFIG["VERSION"]}"
194195
package_dir_path = "pkg/ninjascript"
195196
package_files = Rake::FileList.new
196197
%w{javascript css images}.each do |type|
197198
package_files.include("generated/#{type}/**/*")
198199
end
199200

200-
[ "ninjascript.tgz", "ninjascript.tbz2" ].each do |file|
201+
[ "#{package_name}.tgz", "#{package_name}.tbz2" ].each do |file|
201202
task :package => ["pkg/#{file}"]
202203
file "pkg/#{file}" => [package_dir_path] + package_files do
203204
chdir("pkg") do
@@ -206,10 +207,10 @@ namespace :build do
206207
end
207208
end
208209

209-
task :package => ["pkg/ninjascript.zip"]
210-
file "pkg/ninjascript.zip" => [package_dir_path] + package_files do
210+
task :package => ["pkg/#{package_name}.zip"]
211+
file "pkg/#{package_name}.zip" => [package_dir_path] + package_files do
211212
chdir("pkg") do
212-
sh %{zip -r ninjascript.zip ninjascript}
213+
sh %{zip -r #{package_name}.zip ninjascript}
213214
end
214215
end
215216

0 commit comments

Comments
 (0)