Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Clash Verge
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Clash Verge
Commits
b7bdb7ae
There was an error fetching the commit references. Please try again later.
Unverified
Commit
b7bdb7ae
authored
2 years ago
by
GyDi
Browse files
Options
Downloads
Patches
Plain Diff
chore: meta
parent
2dcf8ac9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/alpha.yml
+7
-0
7 additions, 0 deletions
.github/workflows/alpha.yml
scripts/portable.mjs
+53
-1
53 additions, 1 deletion
scripts/portable.mjs
src-tauri/tauri.meta.json
+81
-1
81 additions, 1 deletion
src-tauri/tauri.meta.json
with
141 additions
and
2 deletions
.github/workflows/alpha.yml
+
7
−
0
View file @
b7bdb7ae
...
@@ -96,3 +96,10 @@ jobs:
...
@@ -96,3 +96,10 @@ jobs:
releaseBody
:
"
Alpha
Version"
releaseBody
:
"
Alpha
Version"
releaseDraft
:
false
releaseDraft
:
false
prerelease
:
true
prerelease
:
true
-
name
:
Portable Bundle For Meta
if
:
matrix.os == 'windows-latest'
run
:
|
yarn run portable --meta
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
This diff is collapsed.
Click to expand it.
scripts/portable.mjs
+
53
−
1
View file @
b7bdb7ae
...
@@ -4,6 +4,8 @@ import AdmZip from "adm-zip";
...
@@ -4,6 +4,8 @@ import AdmZip from "adm-zip";
import
{
createRequire
}
from
"
module
"
;
import
{
createRequire
}
from
"
module
"
;
import
{
getOctokit
,
context
}
from
"
@actions/github
"
;
import
{
getOctokit
,
context
}
from
"
@actions/github
"
;
const
META
=
process
.
argv
.
includes
(
"
--meta
"
);
// use Clash.Meta
/// Script for ci
/// Script for ci
/// 打包绿色版/便携版 (only Windows)
/// 打包绿色版/便携版 (only Windows)
async
function
resolvePortable
()
{
async
function
resolvePortable
()
{
...
@@ -53,4 +55,54 @@ async function resolvePortable() {
...
@@ -53,4 +55,54 @@ async function resolvePortable() {
});
});
}
}
resolvePortable
().
catch
(
console
.
error
);
/// 打包包含Clash.Meta的 (only Windows)
async
function
resolvePortableMeta
()
{
if
(
process
.
platform
!==
"
win32
"
)
return
;
const
releaseDir
=
"
./src-tauri/target/release
"
;
if
(
!
(
await
fs
.
pathExists
(
releaseDir
)))
{
throw
new
Error
(
"
could not found the release dir
"
);
}
const
zip
=
new
AdmZip
();
zip
.
addLocalFile
(
path
.
join
(
releaseDir
,
"
Clash Verge.exe
"
));
zip
.
addLocalFile
(
path
.
join
(
releaseDir
,
"
clash.exe
"
));
zip
.
addLocalFile
(
path
.
join
(
releaseDir
,
"
clash-meta.exe
"
));
zip
.
addLocalFolder
(
path
.
join
(
releaseDir
,
"
resources
"
),
"
resources
"
);
const
require
=
createRequire
(
import
.
meta
.
url
);
const
packageJson
=
require
(
"
../package.json
"
);
const
{
version
}
=
packageJson
;
const
zipFile
=
`Clash.Verge.Meta_
${
version
}
_x64_portable.zip`
;
zip
.
writeZip
(
zipFile
);
console
.
log
(
"
[INFO]: create portable zip successfully
"
);
// push release assets
if
(
process
.
env
.
GITHUB_TOKEN
===
undefined
)
{
throw
new
Error
(
"
GITHUB_TOKEN is required
"
);
}
const
options
=
{
owner
:
context
.
repo
.
owner
,
repo
:
context
.
repo
.
repo
};
const
github
=
getOctokit
(
process
.
env
.
GITHUB_TOKEN
);
const
{
data
:
release
}
=
await
github
.
rest
.
repos
.
getReleaseByTag
({
...
options
,
tag
:
`v
${
version
}
`
,
});
console
.
log
(
release
.
name
);
await
github
.
rest
.
repos
.
uploadReleaseAsset
({
...
options
,
release_id
:
release
.
id
,
name
:
zipFile
,
data
:
zip
.
toBuffer
(),
});
}
if
(
META
)
resolvePortableMeta
().
catch
(
console
.
error
);
else
resolvePortable
().
catch
(
console
.
error
);
This diff is collapsed.
Click to expand it.
src-tauri/tauri.meta.json
+
81
−
1
View file @
b7bdb7ae
{
{
"package"
:
{
"productName"
:
"Clash Verge Meta"
,
"version"
:
"1.0.1"
},
"build"
:
{
"distDir"
:
"../dist"
,
"devPath"
:
"http://localhost:3000/"
,
"beforeDevCommand"
:
"yarn run web:dev"
,
"beforeBuildCommand"
:
"yarn run web:build"
},
"tauri"
:
{
"tauri"
:
{
"systemTray"
:
{
"iconPath"
:
"icons/tray-icon.png"
,
"iconAsTemplate"
:
true
},
"bundle"
:
{
"bundle"
:
{
"externalBin"
:
[
"sidecar/clash"
,
"sidecar/clash-meta"
]
"active"
:
true
,
"targets"
:
"all"
,
"identifier"
:
"top.gydi.clashverge"
,
"icon"
:
[
"icons/32x32.png"
,
"icons/128x128.png"
,
"icons/128x128@2x.png"
,
"icons/icon.icns"
,
"icons/icon.ico"
],
"resources"
:
[
"resources"
],
"externalBin"
:
[
"sidecar/clash"
,
"sidecar/clash-meta"
],
"copyright"
:
"© 2022 zzzgydi All Rights Reserved"
,
"category"
:
"DeveloperTool"
,
"shortDescription"
:
"A Clash GUI based on tauri."
,
"longDescription"
:
"A Clash GUI based on tauri."
,
"deb"
:
{
"depends"
:
[]
},
"macOS"
:
{
"frameworks"
:
[],
"minimumSystemVersion"
:
""
,
"exceptionDomain"
:
""
,
"signingIdentity"
:
null
,
"entitlements"
:
null
},
"windows"
:
{
"certificateThumbprint"
:
null
,
"digestAlgorithm"
:
"sha256"
,
"timestampUrl"
:
""
}
},
"updater"
:
{
"active"
:
true
,
"endpoints"
:
[
"https://github.com/zzzgydi/clash-verge/releases/download/updater/update.json"
,
"https://hub.fastgit.xyz/zzzgydi/clash-verge/releases/download/updater/update-proxy.json"
],
"dialog"
:
false
,
"pubkey"
:
"dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDExNUFBNTBBN0FDNEFBRTUKUldUbHFzUjZDcVZhRVRJM25NS3NkSFlFVElxUkNZMzZ6bHUwRVJjb2F3alJXVzRaeDdSaTA2YWYK"
},
"allowlist"
:
{
"shell"
:
{
"all"
:
true
},
"window"
:
{
"all"
:
true
},
"process"
:
{
"all"
:
true
}
},
"windows"
:
[
{
"title"
:
"Clash Verge"
,
"width"
:
800
,
"height"
:
636
,
"resizable"
:
true
,
"fullscreen"
:
false
,
"decorations"
:
false
,
"transparent"
:
true
,
"minWidth"
:
600
,
"minHeight"
:
520
}
],
"security"
:
{
"csp"
:
"script-src 'unsafe-eval' 'self'; default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'; img-src data: 'self';"
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment