Skip to content

Commit

Permalink
Enhancements
Browse files Browse the repository at this point in the history
Fix cannot upload text files in webgui mode. (#169)
Update build scripts.
  • Loading branch information
tindy2013 committed Aug 5, 2022
1 parent b37f6ae commit 049b814
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- uses: actions/checkout@v2
- name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
run: SHA=$(git rev-parse --short HEAD) && sed -i -e 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- name: Build
run: |
bash scripts/build.macos.release.sh
Expand Down Expand Up @@ -94,13 +94,13 @@ jobs:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- uses: msys2/setup-msys2@v2
with:
update: true
install: base-devel libtool autogen automake autoconf git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libevent mingw-w64-x86_64-pcre2 mingw-w64-x86_64-freetype mingw-w64-x86_64-libpng mingw-w64-x86_64-bzip2 mingw-w64-x86_64-openssl mingw-w64-x86_64-libsodium mingw-w64-x86_64-c-ares mingw-w64-x86_64-boost mingw-w64-x86_64-libmariadbclient unzip p7zip
- name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- name: Cache built dependencies
uses: actions/cache@v2
env:
Expand Down Expand Up @@ -152,14 +152,14 @@ jobs:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- uses: msys2/setup-msys2@v2
with:
update: true
install: base-devel libtool autogen automake autoconf git mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-libevent mingw-w64-i686-pcre2 mingw-w64-i686-freetype mingw-w64-i686-libpng mingw-w64-i686-bzip2 mingw-w64-i686-openssl mingw-w64-i686-libsodium mingw-w64-i686-c-ares mingw-w64-i686-boost mingw-w64-i686-libmariadbclient unzip p7zip
msystem: MINGW32
- name: Add commit id into version
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
- name: Cache built dependencies
uses: actions/cache@v2
env:
Expand Down
6 changes: 1 addition & 5 deletions base/tools/gui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,11 @@
}
},
beforeUpload(file) {
const isType = file.type === 'application/json' || file.type === 'application/octet-stream'
const fsize = file.size / 1024 / 1024 <= 2;
if (!isType) {
this.$message.error('选择的文件格式有误!');
}
if (!fsize) {
this.$message.error('上传的文件不能超过2MB!');
}
return isType && fsize;
return fsize;
},
checkUploadStatus(type) {
if(!this.upload)
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.alpine.clients.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ cd ..

if [[ "$ARCH" = "x86_64" ]];then
curl -LO https://github.com/v2fly/v2ray-core/releases/latest/download/v2ray-linux-64.zip
curl -LO https://github.com/joewalnes/websocketd/releases/download/v0.3.1/websocketd-0.3.1-linux_amd64.zip
curl -LO https://github.com/joewalnes/websocketd/releases/download/v0.4.1/websocketd-0.4.1-linux_amd64.zip
curl -LO https://github.com/shadowsocks/v2ray-plugin/releases/download/v1.3.1/v2ray-plugin-linux-amd64-v1.3.1.tar.gz
else if [[ "$ARCH" = "x86" ]];then
curl -LO https://github.com/v2fly/v2ray-core/releases/latest/download/v2ray-linux-32.zip
curl -LO https://github.com/joewalnes/websocketd/releases/download/v0.3.1/websocketd-0.3.1-linux_386.zip
curl -LO https://github.com/joewalnes/websocketd/releases/download/v0.4.1/websocketd-0.4.1-linux_386.zip
curl -LO https://github.com/shadowsocks/v2ray-plugin/releases/download/v1.3.1/v2ray-plugin-linux-386-v1.3.1.tar.gz
else
if [[ "$ARCH" = "aarch64" ]];then
Expand Down

0 comments on commit 049b814

Please sign in to comment.