From af25a7a8188aa2f1d0e56de4686c6236fd265a87 Mon Sep 17 00:00:00 2001 From: chenxudong2020 <872603935@qq.com> Date: Sat, 12 Oct 2024 21:54:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E7=94=A8=E6=B1=89=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++-- build.sh | 13 ++----------- zh.sh | 4 ++-- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index eafa51f..82a775a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,8 +45,8 @@ RUN set -x\ RUN set -x \ && mkdir /app -p \ && cd /app \ - && git clone --progress https://ghproxy.imoyuapp.win/https://github.com/key-networks/ztncui.git\ - && bash zh.sh \ + && git clone https://github.com/key-networks/ztncui.git\ + && sh zh.sh \ && cd /app/ztncui/src \ && npm config set registry https://registry.npmmirror.com\ && npm install -g node-gyp\ diff --git a/build.sh b/build.sh index 2e353d1..8df1e32 100755 --- a/build.sh +++ b/build.sh @@ -5,14 +5,5 @@ REPO=ZeroTierOne DOCKER_IMAGE="xubiaolin/zerotier-planet" -latest_tag=$(curl -s "https://api.github.com/repos/$USER/$REPO/tags" | jq -r '.[].name' | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -V | tail -n 1) -latest_docker_tag=$(curl -s "https://hub.docker.com/v2/repositories/${DOCKER_IMAGE}/tags/" | jq -r '.results[].name' | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -V | tail -n 1) - -if [ "$latest_tag" == "$latest_docker_tag" ]; then - echo "No new version found" - exit 0 -fi - -echo "Latest tag for $USER/$REPO matching latest is: $latest_tag" -docker buildx build --platform linux/arm64,linux/amd64 -t "$DOCKER_IMAGE":latest --push . -docker buildx build --platform linux/arm64,linux/amd64 -t "${DOCKER_IMAGE}:${latest_tag}" --push . + +docker buildx build --platform linux/arm64,linux/amd64 -t "$DOCKER_IMAGE":latest . diff --git a/zh.sh b/zh.sh index 9a9c7ba..7a565b3 100644 --- a/zh.sh +++ b/zh.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh sed -i "s|'Listening for HTTP requests on port '|'监听HTTP请求的端口 '|g" ztncui/src/bin/www sed -i "s|' on all interfaces'|' 在所有接口上'|g" ztncui/src/bin/www @@ -118,7 +118,7 @@ sed -i "s|network controller UI|网络控制器用户界面|g" ztncui/src/views/ sed -i "s|Logout|注销|g" ztncui/src/views/head_layout.pug sed -i "s|network controller UI by|网络控制器用户界面汉化作者|g" ztncui/src/views/index.pug -sed -i "s|a(href='https://key-networks.com' target='_blank') Key Networks|a(href='https://github.com/niliovo/zerotier-aio-zh' target='_blank') Nili|g" ztncui/src/views/index.pug +sed -i "s|a(href='https://key-networks.com' target='_blank') Key Networks|a(href='https://github.com/chenxudong2020/docker-zerotier-planet' target='_blank') |g" ztncui/src/views/index.pug sed -i "s|This network controller has a ZeroTier address of|该控制器的ZeroTier地址为|g" ztncui/src/views/index.pug sed -i "s|ZeroTier version|ZeroTier版本为|g" ztncui/src/views/index.pug sed -i "s|List all networks on this network controller|列出该网络控制器上的所有网络|g" ztncui/src/views/index.pug