Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
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
clients
Cesium-grp
Cesium
Commits
e78a1ac4
Commit
e78a1ac4
authored
5 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[fix] JS into node 10
parent
38f0d4dd
No related branches found
No related tags found
No related merge requests found
Pipeline
#7964
failed
5 years ago
Stage: build
Stage: alt_build
Stage: publish
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hooks/after_prepare/061_copy_build_extras.js
+16
-16
16 additions, 16 deletions
hooks/after_prepare/061_copy_build_extras.js
with
16 additions
and
16 deletions
hooks/after_prepare/061_copy_build_extras.js
+
16
−
16
View file @
e78a1ac4
#!/usr/bin/env node
"
use strict
"
;
var
fs
=
require
(
'
fs
'
)
;
var
glob
=
require
(
'
glob
'
)
;
var
path
=
require
(
'
path
'
)
const
fs
=
require
(
'
fs
'
)
,
glob
=
require
(
'
glob
'
)
,
path
=
require
(
'
path
'
)
;
// See: https://stackoverflow.com/questions/49162538/running-cordova-build-android-unable-to-find-attribute-androidfontvariation
var
rootdir
=
process
.
argv
[
2
];
const
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
(
'
,
'
)
:
[]);
// go through each of the platform directories that have been prepared
const
platforms
=
(
process
.
env
.
CORDOVA_PLATFORMS
?
process
.
env
.
CORDOVA_PLATFORMS
.
split
(
'
,
'
)
:
[]);
for
(
var
x
=
0
;
x
<
platforms
.
length
;
x
++
)
{
for
(
let
x
=
0
;
x
<
platforms
.
length
;
x
++
)
{
try
{
var
platform
=
platforms
[
x
].
trim
().
toLowerCase
();
const
platform
=
platforms
[
x
].
trim
().
toLowerCase
();
if
(
platform
===
'
android
'
)
{
var
build_dir
=
rootdir
+
'
/resources/android/build
'
;
var
android_dir
=
rootdir
+
'
/platforms/android
'
;
var
build_files
=
build_dir
+
'
/**/*.*
'
;
const
build_dir
=
rootdir
+
'
/resources/android/build
'
;
const
android_dir
=
rootdir
+
'
/platforms/android
'
;
const
build_files
=
build_dir
+
'
/**/*.*
'
;
console
.
log
(
'
-----------------------------------------
'
);
if
(
fs
.
existsSync
(
android_dir
)
&&
fs
.
existsSync
(
build_dir
))
{
var
mkdirp
=
function
(
dir
)
{
var
parent
=
path
.
dirname
(
dir
);
const
mkdirp
=
function
(
dir
)
{
const
parent
=
path
.
dirname
(
dir
);
if
(
!
fs
.
existsSync
(
parent
)){
mkdirp
(
parent
);
}
...
...
@@ -37,18 +37,18 @@ if (rootdir) {
glob
(
build_files
,
null
,
function
(
er
,
files
)
{
files
.
forEach
(
function
(
file
)
{
console
.
log
(
'
Copy
'
+
file
+
'
to
'
+
android_dir
);
var
dest_file
=
file
.
replace
(
build_dir
,
android_dir
);
const
dest_file
=
file
.
replace
(
build_dir
,
android_dir
);
mkdirp
(
path
.
dirname
(
dest_file
));
fs
.
createReadStream
(
file
).
pipe
(
fs
.
createWriteStream
(
dest_file
));
});
});
var
gradle_file
=
build_dir
+
'
/build-extras.gradle
'
;
const
gradle_file
=
build_dir
+
'
/build-extras.gradle
'
;
if
(
!
fs
.
existsSync
(
gradle_file
))
{
console
.
log
(
'
File
'
+
gradle_file
+
'
not found. Skipping copy to /platforms/android
'
);
}
var
signing_file
=
build_dir
+
'
/release-signing.properties
'
;
const
signing_file
=
build_dir
+
'
/release-signing.properties
'
;
if
(
!
fs
.
existsSync
(
signing_file
))
{
console
.
log
(
'
File
'
+
signing_file
+
'
not found. Skipping copy to /platforms/android
'
);
console
.
log
(
'
WARNING: Release APK files will not be signed !
'
);
...
...
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