diff options
| author | Igor Minar | 2012-08-20 08:28:04 -0700 |
|---|---|---|
| committer | Igor Minar | 2012-08-24 15:00:36 -0700 |
| commit | 60a12b416104697d48a465bffbcfefbec35f06ea (patch) | |
| tree | 90ef6410ab0bcd569a7d746e6d55f36eb6020308 /Rakefile | |
| parent | cd7e58ba41eb886be2195e886f57521c568cb0a4 (diff) | |
| download | angular.js-60a12b416104697d48a465bffbcfefbec35f06ea.tar.bz2 | |
chore(docs): use GAE and Google CDN for docs
Short summary: if you use local node server everything should work as before,
if you use GAE, everything should work now as well, but we pull assets from CDN.
- GAE doesn't support ':' in filenames, so I had to replace it with '_'
but only in the filename, all servers were reconfigured to rewrite the
urls from : to _ when doing file lookup
- We now pull angular assets from google CDN when deployed on GAE (locally
or in production). When running on a non GAE server we pull assets from
../ directory as before
- Since only certain versions of Angular are available on CDN and we want
to be able to autodeploy docs, I had to pin down the Angular files
to a "stable" version when running on GAE
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -19,12 +19,13 @@ task :init do v = YAML::load( File.open( 'version.yaml' ) ) match = v['version'].match(/^([^-]*)(-snapshot)?$/) - NG_VERSION = Struct.new(:full, :major, :minor, :dot, :codename). + NG_VERSION = Struct.new(:full, :major, :minor, :dot, :codename, :stable). new(match[1] + (match[2] ? ('-' + %x(git rev-parse HEAD)[0..7]) : ''), match[1].split('.')[0], match[1].split('.')[1], match[1].split('.')[2].sub(/\D+.*$/, ''), - v['codename']) + v['codename'], + v['stable']) end @@ -115,6 +116,14 @@ task :docs => [:init] do rewrite_file(path_to('docs/.htaccess')) do |content| content.sub!('"NG_VERSION_FULL"', NG_VERSION.full) end + rewrite_file(path_to('docs/index.html')) do |content| + content.sub!('"NG_VERSION_FULL"', NG_VERSION.full). + sub!('"NG_VERSION_STABLE"', NG_VERSION.stable) + end + rewrite_file(path_to('docs/docs-scenario.html')) do |content| + content.sub!('"NG_VERSION_FULL"', NG_VERSION.full). + sub!('"NG_VERSION_STABLE"', NG_VERSION.stable) + end end |
