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 @@
>
<name>Cesium</name>
<description>
An simple App for Duniter
An simple App for Duniter wallet
</description>
<author email="contact@e-is.pro">
E-IS PRO
......@@ -88,10 +88,10 @@
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
</platform>
<platform name="firefoxos">
<icon height="128" src="resources/firefoxos/img/logo_128px.png" width="128" />
<icon height="60" src="resources/firefoxos/img/logo_60px.png" width="60" />
<icon height="128" src="www/img/logo_128px.png" width="128" />
<icon height="60" src="www/img/logo_60px.png" width="60" />
</platform>
<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>
</widget>
......@@ -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/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/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"
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
exit
fi
DIRNAME=`pwd`
### Releasing
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
ionic build android --release
ionic build firefoxos --release
gulp build:web --release
ionic build ubuntu --release
cd platforms/ubuntu/native/cesium; debuild
cd $DIRNAME
# Commit
git reset HEAD
......
......@@ -313,7 +313,7 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht
// Compute the root path
var hashIndex = $window.location.href.indexOf('#');
$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(ios)
......
......@@ -153,9 +153,7 @@ angular.module('cesium.device.services', ['ngResource', 'cesium.utils.services',
var started = false;
var startPromise = ionicReady().then(function(){
exports.enable = cordova && cordova.plugins;
console.info('TODO');
exports.enable = window.cordova && cordova && cordova.plugins;
if (exports.enable){
exports.camera.enable = !!navigator.camera;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment