Skip to content

Commit

Permalink
remove support for old equipment
Browse files Browse the repository at this point in the history
  • Loading branch information
xishang0128 committed Dec 29, 2024
1 parent 1537df5 commit 35ef7c6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 29 deletions.
39 changes: 19 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,11 @@ jobs:
path: bin/
merge-multiple: true

- name: Delete Current
uses: 8Mi-Tech/delete-release-assets-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: pre-release
deleteOnlyFromDrafts: false
- name: Delete Prerelease
run: |
gh release delete latest --yes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish Prerelease
if: success()
Expand All @@ -126,20 +125,20 @@ jobs:
uses: actions/checkout@v4

- name: Update Version
run:
INPUT_VERSION="${{ github.event.inputs.version }}"
CLEAN_VERSION=$(echo "$INPUT_VERSION" | sed 's/^v//')
if [[ ! "$CLEAN_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid version format: $INPUT_VERSION"
exit 1
fi
jq --arg version "$CLEAN_VERSION" '.version = $version' package.json > tmp.json && mv tmp.json package.json

git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add package.json
git commit -m "Update version to $CLEAN_VERSION"
git push
run: |
INPUT_VERSION="${{ github.event.inputs.version }}"
CLEAN_VERSION=$(echo "$INPUT_VERSION" | sed 's/^v//')
if [[ ! "$CLEAN_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid version format: $INPUT_VERSION"
exit 1
fi
jq --arg version "$CLEAN_VERSION" '.version = $version' package.json > tmp.json && mv tmp.json package.json
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add package.json
git commit -m "Update version to $CLEAN_VERSION"
git push
- uses: actions/download-artifact@v4
with:
Expand Down
12 changes: 6 additions & 6 deletions scripts/prepare.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ const MIHOMO_ALPHA_URL_PREFIX = `https://github.com/MetaCubeX/mihomo/releases/do
let MIHOMO_ALPHA_VERSION

const MIHOMO_ALPHA_MAP = {
'win32-x64': 'mihomo-windows-amd64-compatible',
'win32-x64': 'mihomo-windows-amd64',
'win32-ia32': 'mihomo-windows-386',
'win32-arm64': 'mihomo-windows-arm64',
'darwin-x64': 'mihomo-darwin-amd64-compatible',
'darwin-x64': 'mihomo-darwin-amd64',
'darwin-arm64': 'mihomo-darwin-arm64',
'linux-x64': 'mihomo-linux-amd64-compatible',
'linux-x64': 'mihomo-linux-amd64',
'linux-arm64': 'mihomo-linux-arm64'
}

Expand All @@ -52,12 +52,12 @@ const MIHOMO_URL_PREFIX = `https://github.com/MetaCubeX/mihomo/releases/download
let MIHOMO_VERSION

const MIHOMO_MAP = {
'win32-x64': 'mihomo-windows-amd64-compatible',
'win32-x64': 'mihomo-windows-amd64',
'win32-ia32': 'mihomo-windows-386',
'win32-arm64': 'mihomo-windows-arm64',
'darwin-x64': 'mihomo-darwin-amd64-compatible',
'darwin-x64': 'mihomo-darwin-amd64',
'darwin-arm64': 'mihomo-darwin-arm64',
'linux-x64': 'mihomo-linux-amd64-compatible',
'linux-x64': 'mihomo-linux-amd64',
'linux-arm64': 'mihomo-linux-arm64'
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/config/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
}
res = await axios.get(urlObj.toString(), {
headers: {
'User-Agent': userAgent || 'clash.meta'
'User-Agent': userAgent || 'clash.meta/alpha-de19f92'
},
responseType: 'text'
})
Expand All @@ -147,7 +147,7 @@ export async function createProfile(item: Partial<IProfileItem>): Promise<IProfi
}
: false,
headers: {
'User-Agent': userAgent || 'clash.meta'
'User-Agent': userAgent || 'clash.meta/alpha-de19f92'
},
responseType: 'text'
})
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/settings/mihomo-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const MihomoConfig: React.FC = () => {
size="sm"
className="w-[60%]"
value={ua}
placeholder="默认 clash.meta"
placeholder="默认 clash.meta/alpha-de19f92"
onValueChange={(v) => {
setUa(v)
setUaDebounce(v)
Expand Down

0 comments on commit 35ef7c6

Please sign in to comment.