From b042a36c6df4983dddfa3e9a8be0cf41fff7dd22 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 25 Jul 2012 16:54:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=9F=E4=B8=80=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../grunt.js => tools/compress.js} | 0 helper/tools/update-version.js | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+) rename helper/{compressor/grunt.js => tools/compress.js} (100%) create mode 100644 helper/tools/update-version.js diff --git a/helper/compressor/grunt.js b/helper/tools/compress.js similarity index 100% rename from helper/compressor/grunt.js rename to helper/tools/compress.js diff --git a/helper/tools/update-version.js b/helper/tools/update-version.js new file mode 100644 index 0000000..653e6c9 --- /dev/null +++ b/helper/tools/update-version.js @@ -0,0 +1,22 @@ +var version = "", +newVersion = ""; + +process.argv.forEach(function (val, index, array) { + if (index === 2) { + version = val; + } + + if (index === 3) { + newVersion = val; + } +}); + +var fs = require("fs"); +var skins = ["andrea", "classic", "community", "favourite", "i-nove", "neoease", "owmx-3.0", "tree-house"]; + +for (var i = 0; i < skins.length; i++) { + var fileName = "../../" + skins[i] + "/skin.properties"; + + var file = fs.readFileSync(fileName, "UTF-8"); + fs.writeFileSync(fileName, file.replace("forSolo=" + version, "forSolo=" + newVersion), "UTF-8"); +} \ No newline at end of file