Browse Source

Only re-write docs _config on version bumps

Doesn't fix, but mostly addresses the concerns in #24. Some churn at
version bumps is far better than what we have right now.
main
Paul O’Shannessy 12 years ago
parent
commit
3147461038
  1. 2
      Rakefile

2
Rakefile

@ -23,8 +23,10 @@ desc "update version to match ../package.json"
task :update_version do task :update_version do
react_version = JSON.parse(File.read('../package.json'))['version'] react_version = JSON.parse(File.read('../package.json'))['version']
site_config = YAML.load_file('_config.yml') site_config = YAML.load_file('_config.yml')
if site_config['react_version'] != react_version
site_config['react_version'] = react_version site_config['react_version'] = react_version
File.open('_config.yml', 'w+') { |f| f.write(site_config.to_yaml) } File.open('_config.yml', 'w+') { |f| f.write(site_config.to_yaml) }
end
end end
desc "build into ../../react-gh-pages" desc "build into ../../react-gh-pages"

Loading…
Cancel
Save