Skip to content

Commit

Permalink
Merge pull request #540 from shankari/release_v280
Browse files Browse the repository at this point in the history
Prepare for releasing version 2.8.0
  • Loading branch information
shankari authored Mar 29, 2019
2 parents 48dcd53 + 01732bc commit f737509
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 3 deletions.
39 changes: 39 additions & 0 deletions bin/gradle_workaround.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import fileinput
import argparse
import logging

BUILD_GRADLE = "platforms/android/build.gradle"
# BUILD_GRADLE = "/tmp/build.gradle"
LINE_BEFORE = "// PLUGIN GRADLE EXTENSIONS END"
OUR_ADD_REMOVE_LINE = 'apply from: "cordova-plugin-crosswalk-webview/xwalk6-workaround.gradle"'

def add_gradle_line():
for line in fileinput.input(BUILD_GRADLE, inplace=True):
line = line.strip("\n")
print(line)
if line == LINE_BEFORE:
print(OUR_ADD_REMOVE_LINE)

def remove_gradle_line():
for line in fileinput.input(BUILD_GRADLE, inplace=True):
line = line.strip("\n")
if line == OUR_ADD_REMOVE_LINE:
pass
else:
print(line)

if __name__ == '__main__':
parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group(required=True)

group.add_argument("-a", "--add", action="store_true",
help="add the xwalk line to build.gradle")
group.add_argument("-r", "--remove", action="store_true",
help="remove the xwalk line from build.gradle")

args = parser.parse_args()

if args.add:
add_gradle_line()
if args.remove:
remove_gradle_line()
2 changes: 1 addition & 1 deletion config.cordovabuild.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="37" id="edu.berkeley.eecs.emission" ios-CFBundleVersion="37" version="2.7.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-versionCode="38" id="edu.berkeley.eecs.emission" ios-CFBundleVersion="38" version="2.8.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>emission</name>
<description>
A commute pattern tracker and carbon footprint estimator.
Expand Down
2 changes: 1 addition & 1 deletion package.cordovabuild.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "edu.berkeley.eecs.emission",
"version": "2.5.0",
"version": "2.8.0",
"displayName": "emission",
"scripts": {
"setup-serve": "./bin/download_settings_controls.js",
Expand Down
17 changes: 16 additions & 1 deletion www/js/splash/updatecheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,21 @@ angular.module('emission.splash.updatecheck', ['emission.plugin.logger',
reloadAlert.then(function(res) {
uc.redirectPromise();
});
});
}).catch(function(err) {
$rootScope.isDownloading = false;
extractPop.close();
$ionicPopup.alert({
title: "Extraction error",
message: JSON.stringify(err)
});
})
}).catch(function(err) {
$rootScope.isDownloading = false;
downloadPop.close();
$ionicPopup.alert({
title: "Download error",
message: JSON.stringify(err)
});
});
};

Expand Down Expand Up @@ -198,6 +212,7 @@ angular.module('emission.splash.updatecheck', ['emission.plugin.logger',
})
})
}).catch(function(err) {
$rootScope.isDownloading = false;
Logger.log('Ionic Deploy: Unable to check for updates'+err);
console.error('Ionic Deploy: Unable to check for updates',err)
})
Expand Down

0 comments on commit f737509

Please sign in to comment.