mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-07 00:02:14 +08:00
update: 构建时直接删除代理
This commit is contained in:
parent
599db00df8
commit
0b68af1b01
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
@ -42,7 +42,7 @@ jobs:
|
||||
npm uninstall node-gyp -g
|
||||
npm install node-gyp nw-gyp npm -g
|
||||
|
||||
- id: tag
|
||||
- id: Tag
|
||||
run: |
|
||||
tag='continuous'
|
||||
name='Continuous Build'
|
||||
@ -65,7 +65,7 @@ jobs:
|
||||
chmod a+x appimagetool-x86_64.AppImage
|
||||
./appimagetool-x86_64.AppImage ./tmp/AppDir
|
||||
env:
|
||||
name: 'release-${{ github.ref_name }}'
|
||||
name: 'release-${{ steps.tag.outputs.tag }}'
|
||||
ARCH: '${{ matrix.ARCH }}'
|
||||
|
||||
- name: Delete unused file
|
||||
@ -80,7 +80,7 @@ jobs:
|
||||
ls -l
|
||||
cd "${{ env.name }}"
|
||||
env:
|
||||
name: 'release-${{ github.ref_name }}'
|
||||
name: 'release-${{ steps.tag.outputs.tag }}'
|
||||
|
||||
- name: Compress
|
||||
run: |
|
||||
@ -91,21 +91,12 @@ jobs:
|
||||
sudo rm -rf ${{ env.name }} compiler nodegit
|
||||
ls -l
|
||||
env:
|
||||
name: 'release-${{ github.ref_name }}'
|
||||
name: 'release-${{ steps.tag.outputs.tag }}'
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
# note you'll typically need to create a personal access token
|
||||
# with permissions to create releases in the other repo
|
||||
prerelease: true
|
||||
target_commitish: ${{ github.sha }}
|
||||
name: ${{ steps.tag.outputs.name }}
|
||||
tag_name: ${{ steps.tag.outputs.tag }}
|
||||
files: |
|
||||
${{ env.name }}.tar.gz
|
||||
compiler.tar.gz
|
||||
nodegit.tar.gz
|
||||
*.AppImage
|
||||
- name: Create release and upload artifacts
|
||||
env:
|
||||
name: 'release-${{ github.ref_name }}'
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
|
||||
chmod +x pyuploadtool-x86_64.AppImage
|
||||
./pyuploadtool-x86_64.AppImage *.AppImage* *.tar.gz
|
||||
|
@ -7,7 +7,10 @@ export APPDATA="$( echo ~ )/.config/wechat_devtools"
|
||||
export PATH="$root_dir/wine:$root_dir/node/bin:$root_dir/nwjs:$PATH"
|
||||
export USERPROFILE=$( echo ~ )
|
||||
|
||||
# LANG=zh_CN.UTF-8 exec "$DIR"/../nwjs/nw --load-extension="$DIR"/../nwjs/package.nw/js/ideplugin "$@"
|
||||
if [ -d ~/.config/wechat_devtools/WeappCache ];then
|
||||
echo "删除缓存"
|
||||
rm -rf ~/.config/wechat_devtools/WeappCache
|
||||
fi
|
||||
|
||||
EXTENSION1="--load-extension=$root_dir/nwjs/package.nw/js/ideplugin"
|
||||
EXTENSION2="--load-extension=$( echo ~ )/.config/wechat_devtools/WeappPlugin"
|
||||
|
@ -5,6 +5,17 @@ srcdir=$root_dir
|
||||
tmp_dir="$root_dir/tmp"
|
||||
package_dir="$root_dir/package.nw"
|
||||
|
||||
# 修复: webview manager
|
||||
# 此bug导致以下功能异常:
|
||||
# 1. 代码依赖分析不可用
|
||||
# 2. 拓展中的“SERVICE MARKET RECOMMENDS”功能不可用
|
||||
echo "fix: webview manager"
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
package_dir="$root_dir/package.nw"
|
||||
sed -i 's#module.exports = createWebviewManager;#module.exports = createWebviewManager,( /** @type {any} */ (window)).createWebviewManager = createWebviewManager;#g' "$package_dir/js/libs/vseditor/webview-resource/main.js"
|
||||
|
||||
# 修复:可视化用的wcc,wcsc
|
||||
echo "fix: wcc,wcsc"
|
||||
mkdir "$tmp_dir/node_modules"
|
||||
cd $tmp_dir && npm install miniprogram-compiler
|
||||
# wcc wcsc
|
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 修复 webview manager
|
||||
# 此bug导致一下功能异常:
|
||||
# 1. 代码依赖分析不可用
|
||||
# 2. 拓展中的“SERVICE MARKET RECOMMENDS”功能不可用
|
||||
|
||||
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
package_dir="$root_dir/package.nw"
|
||||
sed -i 's#module.exports = createWebviewManager;#module.exports = createWebviewManager,( /** @type {any} */ (window)).createWebviewManager = createWebviewManager;#g' "$package_dir/js/libs/vseditor/webview-resource/main.js"
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# 参数:
|
||||
# 1 ---- NW版本
|
||||
#
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
@ -9,10 +9,15 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
NW_VERSION=$1
|
||||
package_dir="$DIR/../package.nw"
|
||||
|
||||
export PATH="$DIR/../node/bin:$PATH"
|
||||
|
||||
NW_VERSION=$1
|
||||
if [ -z $NW_VERSION ]; then
|
||||
echo "NW 版本未指定!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PY_VERSION=`python -V 2>&1|awk '{print $2}'|awk -F '.' '{print $1}'`
|
||||
if [ $PY_VERSION != 2 ]; then
|
||||
hash python2 2>/dev/null || { echo >&2 "I require python2 but it's not installed. Aborting."; exit 1; }
|
||||
@ -23,10 +28,17 @@ hash nw-gyp 2>/dev/null || {
|
||||
echo "=======请安装nw-gyp======="
|
||||
exit 1
|
||||
}
|
||||
if [ -z $NW_VERSION ]; then
|
||||
echo "NW 版本未指定!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 代理处理
|
||||
echo "尝试取消所有代理"
|
||||
unset http_proxy
|
||||
unset HTTP_PROXY
|
||||
unset https_proxy
|
||||
unset HTTPS_PROXY
|
||||
unset socket_proxy
|
||||
unset SOCKET_PROXY
|
||||
unset all_proxy
|
||||
unset ALL_PROXY
|
||||
|
||||
echo -e "\033[42;37m ######## 版本信息 $(date '+%Y-%m-%d %H:%M:%S') ########\033[0m"
|
||||
echo "NW VERSION: $NW_VERSION"
|
||||
@ -35,10 +47,6 @@ echo "node version: $(node --version )"
|
||||
echo "npm version: $(npm --version )"
|
||||
python --version
|
||||
|
||||
if [[ ! -z $https_proxy || ! -z $http_proxy ]]; then
|
||||
echo -e "\033[41;37m 警告: 你设置了代理,这有可能导致安装出现异常 $http_proxy, $https_proxy \033[0m"
|
||||
fi
|
||||
|
||||
rm -fr "${package_dir}/node_modules/vscode-windows-ca-certs" # the module is only available in windows
|
||||
rm -fr "${package_dir}/node_modules/vscode-windows-registry" # the module is only available in windows
|
||||
rm -fr "${package_dir}/node_modules/vscode-windows-registry-node" # the module is only available in windows
|
||||
|
@ -242,17 +242,6 @@ const patch_wechat_devtools_core = function () {
|
||||
});
|
||||
});
|
||||
};
|
||||
const patch_wechat_devtools_webview = function () {
|
||||
info("Patching wechat-devtools webview supports");
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
spawn(path.resolve(__dirname, "fix-webview-manager"), [], {
|
||||
stdio: "inherit",
|
||||
}).on("close", (code) => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
};
|
||||
const rebuild_wechat_devtools_node_modules = function () {
|
||||
info("Rebuilding wechat-devtools node modules");
|
||||
|
||||
@ -290,8 +279,8 @@ const patch_wechat_devtools = function () {
|
||||
});
|
||||
});
|
||||
};
|
||||
const patch_wcc_wcsc = function () {
|
||||
info("Patching wcc and wcsc");
|
||||
const patch_other = function () {
|
||||
info("Patching Other");
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.copyFileSync(
|
||||
@ -302,7 +291,7 @@ const patch_wcc_wcsc = function () {
|
||||
path.resolve(__dirname, "../compiler/wine/wcsc"),
|
||||
path.resolve(__dirname, "../package.nw/js/vendor/wcsc")
|
||||
);
|
||||
execSync(path.resolve(__dirname, "fix-wcc-wcsc"))
|
||||
execSync(path.resolve(__dirname, "fix-other"))
|
||||
|
||||
resolve();
|
||||
});
|
||||
@ -318,10 +307,9 @@ const start = async () => {
|
||||
await patch_wechat_devtools_editor_selection_autocopy();
|
||||
await patch_wechat_devtools_CLI();
|
||||
await patch_wechat_devtools_core();
|
||||
await patch_wechat_devtools_webview();
|
||||
await rebuild_wechat_devtools_node_modules();
|
||||
await patch_wechat_devtools();
|
||||
await patch_wcc_wcsc();
|
||||
await patch_other();
|
||||
console.log(
|
||||
`Succeeded upgrading wechat-devtools to version ${version}`
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user