Skip to content

Commit 3454680

Browse files
committed
use latest axs instead of specific version
1 parent d852c8c commit 3454680

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

src/plugins/terminal/www/Terminal.js

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
const Executor = require("./Executor");
22

3-
/**
4-
* AXS server version tag to be used in downloads.
5-
* @constant {string}
6-
*/
7-
const AXS_VERSION_TAG = "v0.2.5";
8-
93
const Terminal = {
104
/**
115
* Starts the AXS environment by writing init scripts and executing the sandbox.
@@ -117,17 +111,17 @@ const Terminal = {
117111
if (arch === "arm64-v8a") {
118112
libTalloc = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm64/libtalloc.so";
119113
prootUrl = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm64/libproot-xed.so";
120-
axsUrl = `https://github.com/bajrangCoder/acodex_server/releases/download/${AXS_VERSION_TAG}/axs-musl-android-arm64`;
114+
axsUrl = `https://github.com/bajrangCoder/acodex_server/releases/latest/download/axs-musl-android-arm64`;
121115
alpineUrl = "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/aarch64/alpine-minirootfs-3.21.0-aarch64.tar.gz";
122116
} else if (arch === "armeabi-v7a") {
123117
libTalloc = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm32/libtalloc.so";
124118
prootUrl = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm32/libproot-xed.so";
125-
axsUrl = `https://github.com/bajrangCoder/acodex_server/releases/download/${AXS_VERSION_TAG}/axs-musl-android-armv7`;
119+
axsUrl = `https://github.com/bajrangCoder/acodex_server/releases/latest/download/axs-musl-android-armv7`;
126120
alpineUrl = "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/armhf/alpine-minirootfs-3.21.0-armhf.tar.gz";
127121
} else if (arch === "x86_64") {
128122
libTalloc = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/x64/libtalloc.so";
129123
prootUrl = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/x64/libproot-xed.so";
130-
axsUrl = `https://github.com/bajrangCoder/acodex_server/releases/download/${AXS_VERSION_TAG}/axs-musl-android-x86_64`;
124+
axsUrl = `https://github.com/bajrangCoder/acodex_server/releases/latest/download/axs-musl-android-x86_64`;
131125
alpineUrl = "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/x86_64/alpine-minirootfs-3.21.0-x86_64.tar.gz";
132126
} else {
133127
throw new Error(`Unsupported architecture: ${arch}`);
@@ -268,21 +262,21 @@ const Terminal = {
268262
reject("Alpine is not installed.");
269263
return;
270264
}
271-
265+
272266
const cmd = `
273267
set -e
274-
268+
275269
INCLUDE_FILES="alpine .downloaded .extracted axs"
276270
if [ "$FDROID" = "true" ]; then
277271
INCLUDE_FILES="$INCLUDE_FILES libtalloc.so.2 libproot-xed.so"
278272
fi
279-
273+
280274
EXCLUDE="--exclude=alpine/data --exclude=alpine/system --exclude=alpine/vendor --exclude=alpine/sdcard --exclude=alpine/storage"
281-
275+
282276
tar -cf "$PREFIX/aterm_backup.tar" -C "$PREFIX" $EXCLUDE $INCLUDE_FILES
283277
echo "ok"
284278
`;
285-
279+
286280
const result = await Executor.execute(cmd);
287281
if (result === "ok") {
288282
resolve(cordova.file.dataDirectory + "aterm_backup.tar");
@@ -314,24 +308,24 @@ const Terminal = {
314308
if (await this.isAxsRunning()) {
315309
await this.stopAxs();
316310
}
317-
311+
318312
const cmd = `
319313
sleep 2
320-
314+
321315
INCLUDE_FILES="$PREFIX/alpine $PREFIX/.downloaded $PREFIX/.extracted $PREFIX/axs"
322-
316+
323317
if [ "$FDROID" = "true" ]; then
324318
INCLUDE_FILES="$INCLUDE_FILES $PREFIX/libtalloc.so.2 $PREFIX/libproot-xed.so"
325319
fi
326-
320+
327321
for item in $INCLUDE_FILES; do
328322
rm -rf -- "$item"
329323
done
330-
324+
331325
tar -xf "$PREFIX/aterm_backup.bin" -C "$PREFIX"
332326
echo "ok"
333327
`;
334-
328+
335329
const result = await Executor.execute(cmd);
336330
if (result === "ok") {
337331
resolve(result);

0 commit comments

Comments
 (0)