-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'KYAN-develop' of https://github.com/decenomy/DSW
- Loading branch information
Showing
77 changed files
with
2,008 additions
and
1,104 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
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 |
---|---|---|
|
@@ -11,15 +11,26 @@ CPU_CORES=${CPU_CORES:-""} | |
# windows-x64 | ||
ARCHITECTURE=${ARCHITECTURE:-""} | ||
|
||
# Get the origin URL | ||
ORIGIN_URL=$(git config --get remote.origin.url) | ||
|
||
# Extract the github username and repository name | ||
if [[ $ORIGIN_URL =~ ^https://github.com/(.+)/(.+)\.git$ ]]; then | ||
GITHUB_USER="${BASH_REMATCH[1]}" | ||
GITHUB_REPO="${BASH_REMATCH[2]}" | ||
elif [[ $ORIGIN_URL =~ ^[email protected]:(.+)/(.+)\.git$ ]]; then | ||
GITHUB_USER="${BASH_REMATCH[1]}" | ||
GITHUB_REPO="${BASH_REMATCH[2]}" | ||
else | ||
echo "Unable to parse origin URL: $ORIGIN_URL" | ||
exit 1 | ||
fi | ||
|
||
# Sets variables needed for the build | ||
TICKER=${TICKER:-"KYAN"} | ||
TICKER=${TICKER:-"${GITHUB_REPO}"} | ||
UI_NAME=${UI_NAME:-"Kyanite"} | ||
BASE_NAME=${BASE_NAME:-"kyanite"} | ||
|
||
# Sets the github environment variables | ||
GITHUB_USER="decenomy" | ||
GITHUB_REPO="KYAN" | ||
|
||
# Sets the build environment variable | ||
# 0: The build will use the builder image available on docker hub | ||
# 1: The build will use a locally build image for the builder image | ||
|
@@ -227,6 +238,7 @@ docker buildx build \ | |
--build-arg NAME=$UI_NAME \ | ||
--build-arg BASE_NAME=$BASE_NAME \ | ||
--build-arg TARGET=$TARGET \ | ||
--build-arg GITHUB_USER=$GITHUB_USER \ | ||
-f $WALLET_DOCKER_FILE.tmp \ | ||
-t $image_tag \ | ||
. | ||
|
@@ -246,7 +258,7 @@ trace "Container ID: $container_id" | |
# Copy files from the container to the current directory | ||
mkdir -p deploy | ||
rm -rf deploy/$ARCHITECTURE | ||
docker cp "$container_id":/${TICKER}/deploy/. ./deploy/ | ||
docker cp "$container_id":/${GITHUB_USER}/${TICKER}/deploy/. ./deploy/ | ||
|
||
# Main verification process | ||
if [ "$VERIFY" -ge 1 ]; then | ||
|
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
services: | ||
kyanite: | ||
image: ubuntu:24.04 | ||
container_name: kyanite-ctn | ||
restart: always | ||
ports: | ||
- "__PORT_MAINNET__:__PORT_MAINNET__" # TCP mainnet port | ||
- "__RPCPORT_MAINNET__:__RPCPORT_MAINNET__" # RPC mainnet port | ||
volumes: | ||
- ${HOME}/.kyanite:/root/.kyanite:shared | ||
command: | ||
- bash | ||
- -c | ||
- | | ||
if [ ! -f /usr/local/bin/kyanited ]; then | ||
echo "Kyanite binary not found, setting up environment..." | ||
apt-get update && \ | ||
apt-get install -y wget curl unzip && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
echo $(curl -s https://api.github.com/repos/decenomy/KYAN/releases/latest | grep "browser_download_url" | grep -E "Linux(-x64)?\.zip" | cut -d '"' -f 4) > latest_release_url && \ | ||
echo "Latest release URL: $(cat latest_release_url)" && \ | ||
echo $(basename "$(cat latest_release_url)") > latest_filename && \ | ||
echo "Latest filename: $(cat latest_filename)" && \ | ||
wget "$(cat latest_release_url)" && \ | ||
unzip -q "$(cat latest_filename)" && \ | ||
rm "$(cat latest_filename)" && \ | ||
rm latest_filename && \ | ||
rm latest_release_url && \ | ||
mv kyanite* /usr/local/bin; | ||
else | ||
echo "Kyanite binary already installed, skipping setup." | ||
fi | ||
kyanited |
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
Oops, something went wrong.