Skip to content
Snippets Groups Projects
Commit c0f68676 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

Prepare build for ubuntu x64 + upload to github - #400

parent 4c7c32d5
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
> >
<name>Cesium</name> <name>Cesium</name>
<description> <description>
An simple App for Duniter An simple App for Duniter wallet
</description> </description>
<author email="contact@e-is.pro"> <author email="contact@e-is.pro">
E-IS PRO E-IS PRO
...@@ -88,10 +88,10 @@ ...@@ -88,10 +88,10 @@
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /> <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
</platform> </platform>
<platform name="firefoxos"> <platform name="firefoxos">
<icon height="128" src="resources/firefoxos/img/logo_128px.png" width="128" /> <icon height="128" src="www/img/logo_128px.png" width="128" />
<icon height="60" src="resources/firefoxos/img/logo_60px.png" width="60" /> <icon height="60" src="www/img/logo_60px.png" width="60" />
</platform> </platform>
<platform name="ubuntu"> <platform name="ubuntu">
<icon height="57" src="resources/ubuntu/img/logo_57px.png" width="57"/> <icon height="57" src="www/img/logo_57px.png" width="57"/>
</platform> </platform>
</widget> </widget>
...@@ -56,6 +56,7 @@ case "$1" in ...@@ -56,6 +56,7 @@ case "$1" in
curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/web/build/cesium-web-$current.zip $upload_url?name=cesium-v$current-web.zip curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/web/build/cesium-web-$current.zip $upload_url?name=cesium-v$current-web.zip
curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/firefoxos/build/package.zip $upload_url?name=cesium-v$current-firefoxos.zip curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/firefoxos/build/package.zip $upload_url?name=cesium-v$current-firefoxos.zip
curl -i -u $2 -H 'Content-Type: application/vnd.android.package-archive' -T $dirname/platforms/android/build/outputs/apk/android-release.apk $upload_url?name=cesium-v$current-android.apk curl -i -u $2 -H 'Content-Type: application/vnd.android.package-archive' -T $dirname/platforms/android/build/outputs/apk/android-release.apk $upload_url?name=cesium-v$current-android.apk
curl -i -u $2 -H 'Content-Type: application/x-debian-package' -T $dirname/platforms/ubuntu/native/cesium_$current_amd64.deb $upload_url?name=cesium-v$current-ubuntu_x64.deb
echo "Successfully uploading files" echo "Successfully uploading files"
release_url=`echo "$result" | grep -P "\"url\": \"[^\"]+" | grep -oP "https://api.github.com/repos/[a-z0-9/.]+"` release_url=`echo "$result" | grep -P "\"url\": \"[^\"]+" | grep -oP "https://api.github.com/repos/[a-z0-9/.]+"`
......
#!/usr/bin/env node
"use strict";
var gulp = require('gulp');
var path = require("path");
var replace = require('gulp-replace');
var rootdir = process.argv[2];
if (rootdir) {
// go through each of the platform directories that have been prepared
var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);
for(var x=0; x<platforms.length; x++) {
var platform = platforms[x].trim().toLowerCase();
if(platform == 'ubuntu') {
var platformPath = path.join(rootdir, 'platforms', platform);
var ionicConfigFile = path.join(platformPath, 'config.xml');
// Clean unused directories
console.log('-----------------------------------------');
console.log(' Updating file: ' + ionicConfigFile);
gulp.src(ionicConfigFile)
// change App ID into 'duniter-cesium'
.pipe(replace(/id="fr.duniter.cesium"/g, 'id="cesium"'))
.pipe(gulp.dest(platformPath));
console.log('-----------------------------------------');
}
}
}
...@@ -8,6 +8,7 @@ then ...@@ -8,6 +8,7 @@ then
exit exit
fi fi
DIRNAME=`pwd`
### Releasing ### Releasing
current=`grep -P "version\": \"\d+.\d+.\d+(\w*)" package.json | grep -oP "\d+.\d+.\d+(\w*)"` current=`grep -P "version\": \"\d+.\d+.\d+(\w*)" package.json | grep -oP "\d+.\d+.\d+(\w*)"`
...@@ -40,6 +41,9 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then ...@@ -40,6 +41,9 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then
ionic build android --release ionic build android --release
ionic build firefoxos --release ionic build firefoxos --release
gulp build:web --release gulp build:web --release
ionic build ubuntu --release
cd platforms/ubuntu/native/cesium; debuild
cd $DIRNAME
# Commit # Commit
git reset HEAD git reset HEAD
......
...@@ -313,7 +313,7 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht ...@@ -313,7 +313,7 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht
// Compute the root path // Compute the root path
var hashIndex = $window.location.href.indexOf('#'); var hashIndex = $window.location.href.indexOf('#');
$rootScope.rootPath = (hashIndex != -1) ? $window.location.href.substr(0, hashIndex) : $window.location.href; $rootScope.rootPath = (hashIndex != -1) ? $window.location.href.substr(0, hashIndex) : $window.location.href;
console.debug('[app] Detecting root path: ' + $rootScope.rootPath); console.debug('[app] Root path is [' + $rootScope.rootPath + ']');
// removeIf(android) // removeIf(android)
// removeIf(ios) // removeIf(ios)
......
...@@ -153,9 +153,7 @@ angular.module('cesium.device.services', ['ngResource', 'cesium.utils.services', ...@@ -153,9 +153,7 @@ angular.module('cesium.device.services', ['ngResource', 'cesium.utils.services',
var started = false; var started = false;
var startPromise = ionicReady().then(function(){ var startPromise = ionicReady().then(function(){
exports.enable = cordova && cordova.plugins; exports.enable = window.cordova && cordova && cordova.plugins;
console.info('TODO');
if (exports.enable){ if (exports.enable){
exports.camera.enable = !!navigator.camera; exports.camera.enable = !!navigator.camera;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment