[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [snowflake-webext/master] Bump package.json to match manifest.json



commit 68f9cf8fb2481d9116190b83d0303b38cf405b86
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date:   Wed May 6 12:51:52 2020 -0400

    Bump package.json to match manifest.json
    
    Trac: 34127
---
 make.js      | 11 ++++++++---
 package.json |  2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/make.js b/make.js
index 6111913..54f51f5 100755
--- a/make.js
+++ b/make.js
@@ -145,6 +145,12 @@ task('node', 'build the node binary', function() {
   console.log('Node prepared.');
 });
 
+var updateVersion = function(file, version) {
+  var obj = require(file)
+  obj.version = version;
+  writeFileSync(file, JSON.stringify(obj, null, 2), 'utf8');
+};
+
 task('pack-webext', 'pack the webextension for deployment', function() {
   try {
     execSync(`rm -f source.zip`);
@@ -156,9 +162,8 @@ task('pack-webext', 'pack the webextension for deployment', function() {
   execSync(`git submodule update --remote`);
   var version = process.argv[3];
   console.log(version);
-  var manifest = require('./webext/manifest.json')
-  manifest.version = version;
-  writeFileSync('./webext/manifest.json', JSON.stringify(manifest, null, 2), 'utf8');
+  updateVersion('./package.json', version);
+  updateVersion('./webext/manifest.json', version);
   execSync(`git commit -am "bump version to ${version}"`);
   try {
     execSync(`git tag webext-${version}`);
diff --git a/package.json b/package.json
index adceb3d..f3a3600 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "snowflake-pt",
-  "version": "0.0.0-git",
+  "version": "0.3.0",
   "description": "Snowflake is a WebRTC pluggable transport for Tor.",
   "main": "build/snowflake.js",
   "directories": {

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits