Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bpresles
Cesium
Commits
529ac5fd
Commit
529ac5fd
authored
7 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Build web release
parent
4a94ad19
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gulpfile.js
+13
-46
13 additions, 46 deletions
gulpfile.js
with
13 additions
and
46 deletions
gulpfile.js
+
13
−
46
View file @
529ac5fd
...
@@ -277,15 +277,15 @@ gulp.task('css_plugin', function (done) {
...
@@ -277,15 +277,15 @@ gulp.task('css_plugin', function (done) {
});
});
/* -- Web dist build -- */
/* -- Web dist build -- */
gulp
.
task
(
'
clean:tmp
'
,
function
(
done
)
{
gulp
.
task
(
'
clean:tmp
'
,
function
()
{
del
([
'
tmp
'
]
,
done
);
return
del
([
'
tmp
'
]);
});
});
gulp
.
task
(
'
clean:web
'
,
function
(
done
)
{
gulp
.
task
(
'
clean:web
'
,
function
()
{
del
([
return
del
([
'
./platforms/web/www
'
,
'
./platforms/web/www
'
,
'
./platforms/web/build
'
'
./platforms/web/build
'
]
,
done
);
]);
});
});
gulp
.
task
(
'
copy-files:web
'
,
[
'
clean:tmp
'
,
'
clean:web
'
,
'
sass
'
,
'
config
'
],
function
(
done
)
{
gulp
.
task
(
'
copy-files:web
'
,
[
'
clean:tmp
'
,
'
clean:web
'
,
'
sass
'
,
'
config
'
],
function
(
done
)
{
...
@@ -545,9 +545,9 @@ gulp.task('clean-unused-files:web', ['optimize-files:web'], function(done) {
...
@@ -545,9 +545,9 @@ gulp.task('clean-unused-files:web', ['optimize-files:web'], function(done) {
.
on
(
'
end
'
,
done
);
.
on
(
'
end
'
,
done
);
});
});
gulp
.
task
(
'
clean-unused-directories:web
'
,
[
'
clean-unused-files:web
'
],
function
(
done
)
{
gulp
.
task
(
'
clean-unused-directories:web
'
,
[
'
clean-unused-files:web
'
],
function
()
{
var
tmpPath
=
'
./platforms/web/www
'
;
var
tmpPath
=
'
./platforms/web/www
'
;
del
([
return
del
([
tmpPath
+
'
/css
'
,
tmpPath
+
'
/css
'
,
tmpPath
+
'
/templates
'
,
tmpPath
+
'
/templates
'
,
tmpPath
+
'
/js
'
,
tmpPath
+
'
/js
'
,
...
@@ -556,15 +556,15 @@ gulp.task('clean-unused-directories:web', ['clean-unused-files:web'], function(d
...
@@ -556,15 +556,15 @@ gulp.task('clean-unused-directories:web', ['clean-unused-files:web'], function(d
tmpPath
+
'
/lib/ionic/css
'
,
tmpPath
+
'
/lib/ionic/css
'
,
tmpPath
+
'
/lib/ionic/js
'
,
tmpPath
+
'
/lib/ionic/js
'
,
tmpPath
+
'
/lib/ionic/version.json
'
tmpPath
+
'
/lib/ionic/version.json
'
]
,
done
);
]);
});
});
gulp
.
task
(
'
zip:web
'
,
[
'
clean-unused-directories:web
'
],
function
(
done
)
{
gulp
.
task
(
'
zip:web
'
,
[
'
clean-unused-directories:web
'
],
function
()
{
var
tmpPath
=
'
./platforms/web/www
'
;
var
tmpPath
=
'
./platforms/web/www
'
;
var
version
=
JSON
.
parse
(
fs
.
readFileSync
(
'
./package.json
'
,
'
utf8
'
)).
version
;
var
version
=
JSON
.
parse
(
fs
.
readFileSync
(
'
./package.json
'
,
'
utf8
'
)).
version
;
var
txtFilter
=
filter
([
"
**/*.txt
"
],
{
restore
:
true
});
var
txtFilter
=
filter
([
"
**/*.txt
"
],
{
restore
:
true
});
gulp
.
src
(
tmpPath
+
'
/**/*.*
'
)
return
gulp
.
src
(
tmpPath
+
'
/**/*.*
'
)
// Process TXT files: Add the UTF-8 BOM character
// Process TXT files: Add the UTF-8 BOM character
.
pipe
(
txtFilter
)
.
pipe
(
txtFilter
)
...
@@ -573,45 +573,12 @@ gulp.task('zip:web', ['clean-unused-directories:web'], function(done) {
...
@@ -573,45 +573,12 @@ gulp.task('zip:web', ['clean-unused-directories:web'], function(done) {
.
pipe
(
zip
(
'
cesium-web-
'
+
version
+
'
.zip
'
))
.
pipe
(
zip
(
'
cesium-web-
'
+
version
+
'
.zip
'
))
.
pipe
(
gulp
.
dest
(
'
./platforms/web/build
'
))
.
pipe
(
gulp
.
dest
(
'
./platforms/web/build
'
));
.
on
(
'
end
'
,
done
);
});
});
gulp
.
task
(
'
build:web
'
,
[
'
git-check
'
,
'
zip:web
'
],
function
(
done
)
{
gulp
.
task
(
'
build:web
'
,
[
'
git-check
'
,
'
zip:web
'
],
function
()
{
var
version
=
JSON
.
parse
(
fs
.
readFileSync
(
'
./package.json
'
,
'
utf8
'
)).
version
;
var
version
=
JSON
.
parse
(
fs
.
readFileSync
(
'
./package.json
'
,
'
utf8
'
)).
version
;
gutil
.
log
(
gutil
.
colors
.
green
(
"
Build for web created at: 'plateforms/web/build/cesium-web-
"
+
version
+
"
.zip'
"
));
gutil
.
log
(
gutil
.
colors
.
green
(
"
Build for web created at: 'plateforms/web/build/cesium-web-
"
+
version
+
"
.zip'
"
));
del
([
'
tmp
'
]
,
done
);
return
del
([
'
tmp
'
]);
});
});
gulp
.
task
(
'
deploy:android
'
,
function
(
done
)
{
var
config
=
require
(
'
./hooks/playstore-config.json
'
);
if
(
!
config
)
{
gutil
.
log
(
gutil
.
colors
.
red
(
"
ERROR => Could not load `./hooks/playstore-config.json` file!
"
));
return
done
();
}
if
(
!
config
.
client_email
||
!
config
.
private_key
)
{
gutil
.
log
(
gutil
.
colors
.
red
(
"
ERROR => Could not found 'client_email' or 'private_key' in 'hooks/playstore-config.json' file.
"
));
return
done
();
}
var
publisher
=
require
(
'
playup
'
)(
config
);
var
apkFileLocation
=
path
.
join
(
'
.
'
,
'
platforms
'
,
'
android
'
,
'
build
'
,
'
outputs
'
,
'
apk
'
,
'
android-release.apk
'
);
console
.
log
(
'
Publishing APK file [
'
+
apkFileLocation
+
'
] to playstore...
'
);
publisher
.
upload
(
apkFileLocation
,
{
track
:
'
production
'
,
recentChanges
:
{
'
fr-FR
'
:
'
New stable release
'
}
})
.
then
(
function
(
data
)
{
console
.
log
(
'
> APK has been deployed to playstore !
'
);
done
();
})
.
catch
(
function
(
err
){
console
.
log
(
err
);
done
();
});
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment