mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 08:44:29 +00:00
chore: bump version to 1.8.2
This commit is contained in:
parent
c6e30feabd
commit
799adfbf31
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@ -23,13 +23,11 @@ jobs:
|
||||
|
||||
- name: Clone and build po2lmo
|
||||
run: |
|
||||
git clone https://github.com/openwrt-dev/po2lmo.git
|
||||
cd po2lmo
|
||||
make
|
||||
cd ..
|
||||
cp po2lmo/po2lmo ./po2lmo
|
||||
chmod +x ./po2lmo
|
||||
rm -rf po2lmo
|
||||
git clone https://github.com/openwrt-dev/po2lmo.git po2lmo-build
|
||||
cd po2lmo-build
|
||||
make
|
||||
sudo make install
|
||||
|
||||
- name: Build binaries
|
||||
run: |
|
||||
|
||||
16
build.sh
16
build.sh
@ -8,7 +8,7 @@
|
||||
set -e
|
||||
|
||||
project_name="ua3f"
|
||||
release_version="1.8.1"
|
||||
release_version="1.8.2"
|
||||
target=main.go
|
||||
dist=./dist
|
||||
release_dir=./bin
|
||||
@ -44,25 +44,25 @@ for target_item in $TARGET_LIST; do
|
||||
|
||||
case "$goarch" in
|
||||
mipsle-softfloat)
|
||||
GOOS=$goos GOARCH=mipsle GOMIPS=softfloat go build -trimpath -ldflags="-s -w" -o "$obj_name" "$target"
|
||||
CGO_ENABLED=0 GOOS=$goos GOARCH=mipsle GOMIPS=softfloat go build -trimpath -ldflags="-s -w" -o "$obj_name" "$target"
|
||||
;;
|
||||
mipsle-hardfloat)
|
||||
GOOS=$goos GOARCH=mipsle GOMIPS=hardfloat go build -trimpath -ldflags="-s -w" -o "$obj_name" "$target"
|
||||
CGO_ENABLED=0 GOOS=$goos GOARCH=mipsle GOMIPS=hardfloat go build -trimpath -ldflags="-s -w" -o "$obj_name" "$target"
|
||||
;;
|
||||
armv7)
|
||||
GOOS=$goos GOARCH=arm GOARM=7 go build -trimpath -ldflags="-s -w" -o "$obj_name" "$target"
|
||||
CGO_ENABLED=0 GOOS=$goos GOARCH=arm GOARM=7 go build -trimpath -ldflags="-s -w" -o "$obj_name" "$target"
|
||||
;;
|
||||
armv8)
|
||||
alias_name=$project_name-$release_version-${goos}-arm64
|
||||
if [ ! -f "../dist/bin/$alias_name" ]; then
|
||||
echo ">>> Building $goos/arm64 (for armv8 alias)"
|
||||
GOOS=$goos GOARCH=arm64 go build -trimpath -ldflags="-s -w" -o "$alias_name" "$target"
|
||||
CGO_ENABLED=0 GOOS=$goos GOARCH=arm64 go build -trimpath -ldflags="-s -w" -o "$alias_name" "$target"
|
||||
cp "$alias_name" ../dist/bin/
|
||||
fi
|
||||
cp "../dist/bin/$alias_name" "$obj_name"
|
||||
;;
|
||||
*)
|
||||
GOOS=$goos GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "$obj_name" "$target"
|
||||
CGO_ENABLED=0 GOOS=$goos GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "$obj_name" "$target"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -106,7 +106,7 @@ mkdir -p \
|
||||
cp openwrt/files/ua3f.init $opkg_template/etc/init.d/ua3f
|
||||
cp openwrt/files/ua3f.uci $opkg_template/etc/config/ua3f
|
||||
cp -r openwrt/files/luci/* $opkg_template/usr/lib/lua/luci/
|
||||
./po2lmo openwrt/po/zh_cn/ua3f.po $opkg_template/usr/lib/lua/luci/i18n/ua3f.zh-cn.lmo
|
||||
po2lmo openwrt/po/zh_cn/ua3f.po $opkg_template/usr/lib/lua/luci/i18n/ua3f.zh-cn.lmo
|
||||
|
||||
# only build ipk for linux targets
|
||||
for target_item in $TARGET_LIST; do
|
||||
@ -119,6 +119,8 @@ for target_item in $TARGET_LIST; do
|
||||
obj_name=$project_name-$release_version-${goos}-${goarch}
|
||||
[ -f "$dist/bin/$obj_name" ] || continue
|
||||
|
||||
echo ">>> Building IPK for $goos/$goarch ..."
|
||||
|
||||
mv "$dist/bin/$obj_name" $opkg_template/usr/bin/ua3f
|
||||
sh "$ipkg_build" "$opkg_template"
|
||||
mv "$project_name"_"$release_version"-1_all.ipk "$dist/$project_name"_"$release_version"-1_"${goos}_${goarch}".ipk
|
||||
|
||||
@ -12,13 +12,14 @@ set -e
|
||||
version=1.0
|
||||
FIND="$(command -v find)"
|
||||
FIND="${FIND:-$(command -v gfind)}"
|
||||
TAR="${TAR:-$(command -v gtar)}"
|
||||
# Try gtar first (macOS), fall back to tar (Linux)
|
||||
TAR="$(command -v gtar 2>/dev/null || command -v tar)"
|
||||
|
||||
# try to use fixed source epoch
|
||||
if [ -n "$PKG_SOURCE_DATE_EPOCH" ]; then
|
||||
TIMESTAMP=$(date --date="@$PKG_SOURCE_DATE_EPOCH")
|
||||
TIMESTAMP=$(date --date="@$PKG_SOURCE_DATE_EPOCH" 2>/dev/null || date -r "$PKG_SOURCE_DATE_EPOCH")
|
||||
elif [ -n "$SOURCE_DATE_EPOCH" ]; then
|
||||
TIMESTAMP=$(date --date="@$SOURCE_DATE_EPOCH")
|
||||
TIMESTAMP=$(date --date="@$SOURCE_DATE_EPOCH" 2>/dev/null || date -r "$SOURCE_DATE_EPOCH")
|
||||
else
|
||||
TIMESTAMP=$(date)
|
||||
fi
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
Package: ua3f
|
||||
Version: 1.8.1-1
|
||||
Version: 1.8.2-1
|
||||
Depends: luci-compat, ipset, iptables, iptables-mod-tproxy, iptables-mod-extra, iptables-mod-nat-extra, kmod-ipt-conntrack, iptables-mod-ipopt, iptables-mod-nfqueue, iptables-mod-conntrack-extra, kmod-nf-conntrack-netlink
|
||||
Source: /feed/openwrt
|
||||
SourceName: UA3F
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
Package: ua3f
|
||||
Version: 1.8.1-1
|
||||
Version: 1.8.2-1
|
||||
Depends: luci-compat, ipset, iptables, iptables-mod-tproxy, iptables-mod-extra, iptables-mod-nat-extra, kmod-ipt-conntrack, iptables-mod-ipopt, iptables-mod-nfqueue, iptables-mod-conntrack-extra, kmod-nf-conntrack-netlink
|
||||
Source: /feed/openwrt
|
||||
SourceName: UA3F
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=UA3F
|
||||
PKG_VERSION:=1.8.1
|
||||
PKG_VERSION:=1.8.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
# PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
|
||||
@ -6,7 +6,7 @@ local NamedSection = cbi.NamedSection
|
||||
local ua3f = cbi.Map("ua3f",
|
||||
"UA3F",
|
||||
[[
|
||||
<a href="https://github.com/SunBK201/UA3F" target="_blank">Version: 1.8.1</a>
|
||||
<a href="https://github.com/SunBK201/UA3F" target="_blank">Version: 1.8.2</a>
|
||||
<br>
|
||||
Across the Campus we can reach every corner in the world.
|
||||
]]
|
||||
|
||||
@ -15,7 +15,7 @@ import (
|
||||
"github.com/sunbk201/ua3f/internal/statistics"
|
||||
)
|
||||
|
||||
const version = "1.8.1"
|
||||
const version = "1.8.2"
|
||||
|
||||
func main() {
|
||||
cfg, showVer := config.Parse()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user