feat: upgrade to olive
This commit is contained in:
parent
58cc10b6b0
commit
1f5cea2c27
@ -2,7 +2,7 @@ variables:
|
|||||||
TUTOR_PLUGIN: android
|
TUTOR_PLUGIN: android
|
||||||
TUTOR_IMAGES: android
|
TUTOR_IMAGES: android
|
||||||
TUTOR_PYPI_PACKAGE: tutor-android
|
TUTOR_PYPI_PACKAGE: tutor-android
|
||||||
OPENEDX_RELEASE: nutmeg
|
OPENEDX_RELEASE: olive
|
||||||
GITHUB_REPO: overhangio/tutor-android
|
GITHUB_REPO: overhangio/tutor-android
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
|||||||
@ -16,7 +16,7 @@ Usage
|
|||||||
Enable the plugin and start the platform::
|
Enable the plugin and start the platform::
|
||||||
|
|
||||||
tutor plugins enable android
|
tutor plugins enable android
|
||||||
tutor local quickstart
|
tutor local launch
|
||||||
|
|
||||||
|
|
||||||
The ``.apk`` file will then be available for download at http(s)://mobile.LMS_HOST/app.apk. When running locally, this will be: http://mobile.local.overhang.io/app.apk. You can forward this address to your students for download.
|
The ``.apk`` file will then be available for download at http(s)://mobile.LMS_HOST/app.apk. When running locally, this will be: http://mobile.local.overhang.io/app.apk. You can forward this address to your students for download.
|
||||||
|
|||||||
2
setup.py
2
setup.py
@ -43,7 +43,7 @@ setup(
|
|||||||
packages=find_packages(exclude=["tests*"]),
|
packages=find_packages(exclude=["tests*"]),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
python_requires=">=3.7",
|
python_requires=">=3.7",
|
||||||
install_requires=["tutor>=14.0.0,<15.0.0"],
|
install_requires=["tutor>=15.0.0,<16.0.0"],
|
||||||
entry_points={
|
entry_points={
|
||||||
"tutor.plugin.v1": [
|
"tutor.plugin.v1": [
|
||||||
"android = tutorandroid.plugin"
|
"android = tutorandroid.plugin"
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
__version__ = "14.0.1"
|
__version__ = "15.0.0"
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,9 @@ config = {
|
|||||||
"defaults": {
|
"defaults": {
|
||||||
"VERSION": __version__,
|
"VERSION": __version__,
|
||||||
"APP_HOST": "mobile.{{ LMS_HOST }}",
|
"APP_HOST": "mobile.{{ LMS_HOST }}",
|
||||||
"APP_VERSION": "3.0.2", # https://github.com/edx/edx-app-android/releases
|
# Unfortunately 3.2.2 is not functional: https://github.com/openedx/build-test-release-wg/issues/211#issuecomment-1344311500
|
||||||
|
# "APP_VERSION": "3.2.2", # https://github.com/openedx/edx-app-android/releases
|
||||||
|
"APP_VERSION": "3.0.2",
|
||||||
"DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-android:{{ ANDROID_VERSION }}",
|
"DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-android:{{ ANDROID_VERSION }}",
|
||||||
"APP_DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-android-app:{{ ANDROID_VERSION }}",
|
"APP_DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-android-app:{{ ANDROID_VERSION }}",
|
||||||
"ENABLE_RELEASE_MODE": False,
|
"ENABLE_RELEASE_MODE": False,
|
||||||
@ -21,12 +23,22 @@ config = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
tutor_hooks.Filters.COMMANDS_INIT.add_item(
|
with open(
|
||||||
(
|
os.path.join(
|
||||||
|
pkg_resources.resource_filename("tutorandroid", "templates"),
|
||||||
|
"android",
|
||||||
|
"tasks",
|
||||||
"lms",
|
"lms",
|
||||||
("android", "tasks", "lms", "init"),
|
"init",
|
||||||
|
),
|
||||||
|
encoding="utf8",
|
||||||
|
) as fi:
|
||||||
|
tutor_hooks.Filters.CLI_DO_INIT_TASKS.add_item(
|
||||||
|
(
|
||||||
|
"lms",
|
||||||
|
fi.read(),
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
tutor_hooks.Filters.IMAGES_BUILD.add_items(
|
tutor_hooks.Filters.IMAGES_BUILD.add_items(
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
|
|||||||
@ -16,7 +16,7 @@ ENV ANDROID_SDK_PATH /app/android-sdk
|
|||||||
ENV ANDROID_HOME /app/android-sdk
|
ENV ANDROID_HOME /app/android-sdk
|
||||||
RUN mkdir ${ANDROID_HOME}
|
RUN mkdir ${ANDROID_HOME}
|
||||||
WORKDIR /app/android-sdk
|
WORKDIR /app/android-sdk
|
||||||
RUN wget https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip && \
|
RUN wget --quiet https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip && \
|
||||||
unzip commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip && \
|
unzip commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip && \
|
||||||
rm commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip
|
rm commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ ARG ANDROID_API_LEVEL=30
|
|||||||
RUN yes | /app/android-sdk/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "platforms;android-$ANDROID_API_LEVEL" 1> /dev/null
|
RUN yes | /app/android-sdk/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_HOME} --install "platforms;android-$ANDROID_API_LEVEL" 1> /dev/null
|
||||||
|
|
||||||
# Install android app repo
|
# Install android app repo
|
||||||
ARG ANDROID_APP_REPOSITORY=https://github.com/edx/edx-app-android
|
ARG ANDROID_APP_REPOSITORY=https://github.com/openedx/edx-app-android
|
||||||
ARG ANDROID_APP_VERSION=release/{{ ANDROID_APP_VERSION }}
|
ARG ANDROID_APP_VERSION=release/{{ ANDROID_APP_VERSION }}
|
||||||
RUN git clone $ANDROID_APP_REPOSITORY --branch $ANDROID_APP_VERSION /app/edx-app-android
|
RUN git clone $ANDROID_APP_REPOSITORY --branch $ANDROID_APP_VERSION /app/edx-app-android
|
||||||
WORKDIR /app/edx-app-android
|
WORKDIR /app/edx-app-android
|
||||||
|
|||||||
@ -15,6 +15,6 @@ RUN ./gradlew assembleProd{{ "Release" if ANDROID_ENABLE_RELEASE_MODE else "Debu
|
|||||||
|
|
||||||
#### File server to serve apk file
|
#### File server to serve apk file
|
||||||
# https://hub.docker.com/_/caddy?tab=tags
|
# https://hub.docker.com/_/caddy?tab=tags
|
||||||
FROM docker.io/caddy:2.5.1-alpine as production
|
FROM docker.io/caddy:2.6.2-alpine as production
|
||||||
COPY --from=build /app/edx-app-android/OpenEdXMobile/build/outputs/apk/prod/{{ "release" if ANDROID_ENABLE_RELEASE_MODE else "debuggable" }}/edx-{{ "release" if ANDROID_ENABLE_RELEASE_MODE else "debuggable" }}-{{ ANDROID_APP_VERSION }}.apk /srv/app.apk
|
COPY --from=build /app/edx-app-android/OpenEdXMobile/build/outputs/apk/prod/{{ "release" if ANDROID_ENABLE_RELEASE_MODE else "debuggable" }}/edx-{{ "release" if ANDROID_ENABLE_RELEASE_MODE else "debuggable" }}-{{ ANDROID_APP_VERSION }}.apk /srv/app.apk
|
||||||
CMD caddy file-server --listen=:8000 --root=/srv
|
CMD caddy file-server --listen=:8000 --root=/srv
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user