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
92d62b0a
Commit
92d62b0a
authored
4 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Fix android release script
parent
824f7ae3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/env-global.sh
+13
-24
13 additions, 24 deletions
scripts/env-global.sh
scripts/run-android.sh
+2
-3
2 additions, 3 deletions
scripts/run-android.sh
with
15 additions
and
27 deletions
scripts/env-global.sh
+
13
−
24
View file @
92d62b0a
...
...
@@ -26,6 +26,7 @@ ANDROID_NDK_VERSION=r19c
ANDROID_SDK_VERSION
=
r29.0.2
ANDROID_SDK_TOOLS_VERSION
=
4333796
ANDROID_SDK_ROOT
=
/usr/lib/android-sdk
ANDROID_ALTERNATIVE_SDK_ROOT
=
"
${
HOME
}
/Android/Sdk"
ANDROID_SDK_TOOLS_ROOT
=
${
ANDROID_SDK_ROOT
}
/build-tools
ANDROID_OUTPUT_APK
=
${
PROJECT_DIR
}
/platforms/android/build/outputs/apk
ANDROID_OUTPUT_APK_DEBUG
=
${
ANDROID_OUTPUT_APK
}
/debug
...
...
@@ -37,20 +38,18 @@ DIST_ANDROID=${PROJECT_DIR}/dist/android
# Addons Mozilla Web extension ID
WEB_EXT_ID
=
"{6f9922f7-a054-4609-94ce-d269993246a5}"
#JAVA_HOME= /!\ TODO Should be define in your <project>/.local/env.sh file
# /!\ WARN can be define in your <project>/.local/env.sh file
#JAVA_HOME=
GRADLE_VERSION
=
4.10.3
GRADLE_HOME
=
${
HOME
}
/.gradle/
${
GRADLE_VERSION
}
CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL
=
https://services.gradle.org/distributions/gradle-
${
GRADLE_VERSION
}
-all
.zip
# Override with a local file, if any
if
[[
-f
"
${
PROJECT_DIR
}
/.local/env.sh"
]]
;
then
echo
"Loading environment variables from: '.local/env.sh'"
source
${
PROJECT_DIR
}
/.local/env.sh
if
[[
$?
-ne
0
]]
;
then
exit
1
fi
[[
$?
-ne
0
]]
&&
exit
1
else
echo
"No file '
${
PROJECT_DIR
}
/.local/env.sh' found. Will use defaults"
fi
...
...
@@ -78,20 +77,11 @@ if [[ "_" == "_${JAVA_HOME}" ]]; then
fi
# Check Android SDK root path
DEFAULT_ANDROID_SDK_ROOT
=
"
${
HOME
}
/Android/Sdk"
if
[[
"_"
==
"_
${
ANDROID_SDK_ROOT
}
"
]]
;
then
if
[[
-d
"
${
DEFAULT_ANDROID_SDK_ROOT
}
"
]]
;
then
export
ANDROID_SDK_ROOT
=
"
${
DEFAULT_ANDROID_SDK_ROOT
}
"
else
echo
"Please set env variable ANDROID_SDK_ROOT"
exit
1
fi
fi
if
[[
!
-d
"
${
ANDROID_SDK_ROOT
}
"
]]
;
then
if
[[
!
-d
"
${
ANDROID_SDK_ROOT
}
"
]]
;
then
export
ANDROID_SDK_ROOT
=
"
${
DEFAULT_ANDROID_SDK_ROOT
}
"
if
[[
"_"
==
"_
${
ANDROID_SDK_ROOT
}
"
||
!
-d
"
${
ANDROID_SDK_ROOT
}
"
]]
;
then
if
[[
-d
"
${
ANDROID_ALTERNATIVE_SDK_ROOT
}
"
]]
;
then
export
ANDROID_SDK_ROOT
=
"
${
ANDROID_ALTERNATIVE_SDK_ROOT
}
"
else
echo
"
Invalid path for ANDROID_SDK_ROOT:
${
ANDROID_SDK_ROOT
}
is not a
directory"
echo
"
Please set env variable ANDROID_SDK_ROOT to an existing
directory"
exit
1
fi
fi
...
...
@@ -129,17 +119,16 @@ else
fi
# Install global dependencies
YARN_PATH
=
`
which yarn
`
IONIC_PATH
=
`
which ionic
`
CORDOVA_PATH
=
`
which cordova
`
CORDOVA_RES_PATH
=
`
which cordova-res
`
NATIVE_RUN_PATH
=
`
which native-run
`
WEB_EXT_PATH
=
`
which web-ext
`
if
[[
"_"
==
"_
${
IONIC_PATH
}
"
||
"_"
==
"_
${
CORDOVA_PATH
}
"
||
"_"
==
"_
${
CORDOVA_RES_PATH
}
"
||
"_"
==
"_
${
NATIVE_RUN_PATH
}
"
||
"_"
==
"_
${
WEB_EXT_PATH
}
"
]]
;
then
if
[[
"_"
==
"_
${
YARN_PATH
}
"
||
"_"
==
"_
${
IONIC_PATH
}
"
||
"_"
==
"_
${
CORDOVA_PATH
}
"
||
"_"
==
"_
${
CORDOVA_RES_PATH
}
"
||
"_"
==
"_
${
NATIVE_RUN_PATH
}
"
||
"_"
==
"_
${
WEB_EXT_PATH
}
"
]]
;
then
echo
"Installing global dependencies..."
npm
install
-g
cordova cordova-res @ionic/cli web-ext native-run yarn
if
[[
$?
-ne
0
]]
;
then
exit
1
fi
npm
install
-g
yarn cordova cordova-res @ionic/cli web-ext native-run
[[
$?
-ne
0
]]
&&
exit
1
# Make sure Ionic use yarn
ionic config
set
-g
yarn
true
...
...
@@ -149,7 +138,7 @@ fi
if
[[
!
-d
"
${
PROJECT_DIR
}
/node_modules"
]]
;
then
echo
"Installing project dependencies..."
cd
${
PROJECT_DIR
}
yarn
yarn
install
fi
# Install project submodules
...
...
This diff is collapsed.
Click to expand it.
scripts/run-android.sh
+
2
−
3
View file @
92d62b0a
...
...
@@ -9,15 +9,14 @@ fi;
# Preparing Android environment
.
${
PROJECT_DIR
}
/scripts/env-android.sh
if
[[
$?
-ne
0
]]
;
then
exit
1
fi
[[
$?
-ne
0
]]
&&
exit
1
cd
${
PROJECT_DIR
}
# Run the build
echo
"Building Android application..."
ionic cordova build android
--warning-mode
=
none
--color
$*
[[
$?
-ne
0
]]
&&
exit
1
echo
"Running Android application..."
if
[[
"
$1
"
==
"--release"
]]
;
then
...
...
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