element/build/bin/version.js

7 lines
327 B
JavaScript
Raw Normal View History

2017-01-17 11:33:47 +08:00
var fs = require('fs');
var path = require('path');
var version = process.env.VERSION || require('../../package.json').version;
2017-02-22 18:16:48 +08:00
var content = { '1.0.9': '1.0', '1.1.6': '1.1' };
if (!content[version]) content[version] = '1.2';
2017-01-17 11:33:47 +08:00
fs.writeFileSync(path.resolve(__dirname, '../../examples/versions.json'), JSON.stringify(content));