mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +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 uninstall node-gyp -g
|
||||||
npm install node-gyp nw-gyp npm -g
|
npm install node-gyp nw-gyp npm -g
|
||||||
|
|
||||||
- id: tag
|
- id: Tag
|
||||||
run: |
|
run: |
|
||||||
tag='continuous'
|
tag='continuous'
|
||||||
name='Continuous Build'
|
name='Continuous Build'
|
||||||
@ -65,7 +65,7 @@ jobs:
|
|||||||
chmod a+x appimagetool-x86_64.AppImage
|
chmod a+x appimagetool-x86_64.AppImage
|
||||||
./appimagetool-x86_64.AppImage ./tmp/AppDir
|
./appimagetool-x86_64.AppImage ./tmp/AppDir
|
||||||
env:
|
env:
|
||||||
name: 'release-${{ github.ref_name }}'
|
name: 'release-${{ steps.tag.outputs.tag }}'
|
||||||
ARCH: '${{ matrix.ARCH }}'
|
ARCH: '${{ matrix.ARCH }}'
|
||||||
|
|
||||||
- name: Delete unused file
|
- name: Delete unused file
|
||||||
@ -80,7 +80,7 @@ jobs:
|
|||||||
ls -l
|
ls -l
|
||||||
cd "${{ env.name }}"
|
cd "${{ env.name }}"
|
||||||
env:
|
env:
|
||||||
name: 'release-${{ github.ref_name }}'
|
name: 'release-${{ steps.tag.outputs.tag }}'
|
||||||
|
|
||||||
- name: Compress
|
- name: Compress
|
||||||
run: |
|
run: |
|
||||||
@ -91,21 +91,12 @@ jobs:
|
|||||||
sudo rm -rf ${{ env.name }} compiler nodegit
|
sudo rm -rf ${{ env.name }} compiler nodegit
|
||||||
ls -l
|
ls -l
|
||||||
env:
|
env:
|
||||||
name: 'release-${{ github.ref_name }}'
|
name: 'release-${{ steps.tag.outputs.tag }}'
|
||||||
|
|
||||||
- name: Release
|
- name: Create release and upload artifacts
|
||||||
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
|
|
||||||
env:
|
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 PATH="$root_dir/wine:$root_dir/node/bin:$root_dir/nwjs:$PATH"
|
||||||
export USERPROFILE=$( echo ~ )
|
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"
|
EXTENSION1="--load-extension=$root_dir/nwjs/package.nw/js/ideplugin"
|
||||||
EXTENSION2="--load-extension=$( echo ~ )/.config/wechat_devtools/WeappPlugin"
|
EXTENSION2="--load-extension=$( echo ~ )/.config/wechat_devtools/WeappPlugin"
|
||||||
|
@ -5,6 +5,17 @@ srcdir=$root_dir
|
|||||||
tmp_dir="$root_dir/tmp"
|
tmp_dir="$root_dir/tmp"
|
||||||
package_dir="$root_dir/package.nw"
|
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"
|
mkdir "$tmp_dir/node_modules"
|
||||||
cd $tmp_dir && npm install miniprogram-compiler
|
cd $tmp_dir && npm install miniprogram-compiler
|
||||||
# wcc wcsc
|
# 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
|
#!/bin/bash
|
||||||
# 参数:
|
# 参数:
|
||||||
# 1 ---- NW版本
|
# 1 ---- NW版本
|
||||||
#
|
|
||||||
SOURCE="${BASH_SOURCE[0]}"
|
SOURCE="${BASH_SOURCE[0]}"
|
||||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
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
|
[[ $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
|
done
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||||
NW_VERSION=$1
|
|
||||||
package_dir="$DIR/../package.nw"
|
package_dir="$DIR/../package.nw"
|
||||||
|
|
||||||
export PATH="$DIR/../node/bin:$PATH"
|
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}'`
|
PY_VERSION=`python -V 2>&1|awk '{print $2}'|awk -F '.' '{print $1}'`
|
||||||
if [ $PY_VERSION != 2 ]; then
|
if [ $PY_VERSION != 2 ]; then
|
||||||
hash python2 2>/dev/null || { echo >&2 "I require python2 but it's not installed. Aborting."; exit 1; }
|
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======="
|
echo "=======请安装nw-gyp======="
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
if [ -z $NW_VERSION ]; then
|
|
||||||
echo "NW 版本未指定!"
|
# 代理处理
|
||||||
exit 1
|
echo "尝试取消所有代理"
|
||||||
fi
|
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 -e "\033[42;37m ######## 版本信息 $(date '+%Y-%m-%d %H:%M:%S') ########\033[0m"
|
||||||
echo "NW VERSION: $NW_VERSION"
|
echo "NW VERSION: $NW_VERSION"
|
||||||
@ -35,10 +47,6 @@ echo "node version: $(node --version )"
|
|||||||
echo "npm version: $(npm --version )"
|
echo "npm version: $(npm --version )"
|
||||||
python --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-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" # the module is only available in windows
|
||||||
rm -fr "${package_dir}/node_modules/vscode-windows-registry-node" # 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 () {
|
const rebuild_wechat_devtools_node_modules = function () {
|
||||||
info("Rebuilding wechat-devtools node modules");
|
info("Rebuilding wechat-devtools node modules");
|
||||||
|
|
||||||
@ -290,8 +279,8 @@ const patch_wechat_devtools = function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const patch_wcc_wcsc = function () {
|
const patch_other = function () {
|
||||||
info("Patching wcc and wcsc");
|
info("Patching Other");
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
fs.copyFileSync(
|
fs.copyFileSync(
|
||||||
@ -302,7 +291,7 @@ const patch_wcc_wcsc = function () {
|
|||||||
path.resolve(__dirname, "../compiler/wine/wcsc"),
|
path.resolve(__dirname, "../compiler/wine/wcsc"),
|
||||||
path.resolve(__dirname, "../package.nw/js/vendor/wcsc")
|
path.resolve(__dirname, "../package.nw/js/vendor/wcsc")
|
||||||
);
|
);
|
||||||
execSync(path.resolve(__dirname, "fix-wcc-wcsc"))
|
execSync(path.resolve(__dirname, "fix-other"))
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
@ -318,10 +307,9 @@ const start = async () => {
|
|||||||
await patch_wechat_devtools_editor_selection_autocopy();
|
await patch_wechat_devtools_editor_selection_autocopy();
|
||||||
await patch_wechat_devtools_CLI();
|
await patch_wechat_devtools_CLI();
|
||||||
await patch_wechat_devtools_core();
|
await patch_wechat_devtools_core();
|
||||||
await patch_wechat_devtools_webview();
|
|
||||||
await rebuild_wechat_devtools_node_modules();
|
await rebuild_wechat_devtools_node_modules();
|
||||||
await patch_wechat_devtools();
|
await patch_wechat_devtools();
|
||||||
await patch_wcc_wcsc();
|
await patch_other();
|
||||||
console.log(
|
console.log(
|
||||||
`Succeeded upgrading wechat-devtools to version ${version}`
|
`Succeeded upgrading wechat-devtools to version ${version}`
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user