-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* download jar in Dockerfile add multiplatform build update version logic add tag push trigger * Bump ubuntu LTS; fix arm build --------- Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
38 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
.git | ||
|
||
sidecar/main_test.go | ||
scripts/download-jar.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
#!/bin/bash | ||
|
||
script_dir=$(cd -- "$(dirname -- "$0")" &> /dev/null && pwd) | ||
set -eo pipefail | ||
|
||
# Downloads JAR outside of the Dockerfile to avoid re-downloading it every time during rebuilds. | ||
jar_version="v120" | ||
jar_url="https://github.com/neodix42/MyLocalTon/releases/download/${jar_version}/MyLocalTon-x86-64.jar" | ||
jar_file="$script_dir/my-local-ton.jar" | ||
arch=$(uname -m) | ||
|
||
if [ -f "$jar_file" ]; then | ||
echo "File $jar_file already exists. Skipping download." | ||
exit 0 | ||
fi | ||
case $arch in | ||
x86_64) | ||
arch_suffix="x86-64" | ||
;; | ||
aarch64|arm64) | ||
arch_suffix="arm64" | ||
;; | ||
*) | ||
echo "Unsupported architecture: $arch" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
jar_url="https://github.com/neodix42/MyLocalTon/releases/download/${jar_version}/MyLocalTon-${arch_suffix}.jar" | ||
|
||
echo "File not found. Downloading..." | ||
echo "URL: $jar_url" | ||
wget -q --show-progress -O "$jar_file" "$jar_url" | ||
curl -L -o "my-local-ton.jar" "$jar_url" |
Empty file.