diff options
| author | Linus Färnstrand <faern@faern.net> | 2023-01-20 14:44:33 +0100 |
|---|---|---|
| committer | Linus Färnstrand <faern@faern.net> | 2023-01-24 09:05:08 +0100 |
| commit | 54c6fedf2b69609ca4605ff21f52383f60a18256 (patch) | |
| tree | 74f27d11e96282bb705b8effa42ebafb3c74b3a6 | |
| parent | 99b36c48ba03968872bff96758b8450643b6521d (diff) | |
| download | mullvadvpn-54c6fedf2b69609ca4605ff21f52383f60a18256.tar.xz mullvadvpn-54c6fedf2b69609ca4605ff21f52383f60a18256.zip | |
Move shell-completions to build/
| -rw-r--r-- | .gitignore | 1 | ||||
| -rwxr-xr-x | build.sh | 4 | ||||
| -rw-r--r-- | gui/tasks/distribution.js | 24 |
3 files changed, 16 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore index 98ce309334..a9d4d84571 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ /dist-assets/talpid_openvpn_plugin.dll /dist-assets/openvpn /dist-assets/openvpn.exe -/dist-assets/shell-completions/ /dist-assets/aarch64-apple-darwin/ /dist-assets/x86_64-apple-darwin/ /windows/version.h @@ -316,11 +316,11 @@ fi log_header "Preparing for packaging Mullvad VPN $PRODUCT_VERSION" if [[ "$(uname -s)" == "Darwin" || "$(uname -s)" == "Linux" ]]; then - mkdir -p "dist-assets/shell-completions" + mkdir -p "build/shell-completions" for sh in bash zsh fish; do log_info "Generating shell completion script for $sh..." cargo run --bin mullvad "${CARGO_ARGS[@]}" -- shell-completions "$sh" \ - "dist-assets/shell-completions/" + "build/shell-completions/" done fi diff --git a/gui/tasks/distribution.js b/gui/tasks/distribution.js index 1f045ba249..d3d6ad6dc6 100644 --- a/gui/tasks/distribution.js +++ b/gui/tasks/distribution.js @@ -26,7 +26,7 @@ const config = { compression: noCompression ? 'store' : 'normal', extraResources: [ { from: distAssets('ca.crt'), to: '.' }, - { from: root('build/relays.json'), to: '.' }, + { from: buildAssets('relays.json'), to: '.' }, { from: root('CHANGELOG.md'), to: '.' }, ], @@ -99,8 +99,8 @@ const config = { }, { from: distAssets(path.join('binaries', '${env.TARGET_TRIPLE}', 'openvpn')), to: '.' }, { from: distAssets('uninstall_macos.sh'), to: './uninstall.sh' }, - { from: distAssets('shell-completions/_mullvad'), to: '.' }, - { from: distAssets('shell-completions/mullvad.fish'), to: '.' }, + { from: buildAssets('shell-completions/_mullvad'), to: '.' }, + { from: buildAssets('shell-completions/mullvad.fish'), to: '.' }, ], }, @@ -142,7 +142,7 @@ const config = { to: '.', }, { from: distAssets('binaries/x86_64-pc-windows-msvc/openvpn.exe'), to: '.' }, - { from: root('build/lib/x86_64-pc-windows-msvc/libwg.dll'), to: '.' }, + { from: buildAssets('lib/x86_64-pc-windows-msvc/libwg.dll'), to: '.' }, { from: distAssets('binaries/x86_64-pc-windows-msvc/wintun/wintun.dll'), to: '.' }, { from: distAssets('binaries/x86_64-pc-windows-msvc/split-tunnel/mullvad-split-tunnel.sys'), to: '.' }, { @@ -190,10 +190,10 @@ const config = { distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-daemon')) + '=/usr/bin/', distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-exclude')) + '=/usr/bin/', distAssets('linux/problem-report-link') + '=/usr/bin/mullvad-problem-report', - distAssets('shell-completions/mullvad.bash') + + buildAssets('shell-completions/mullvad.bash') + '=/usr/share/bash-completion/completions/mullvad', - distAssets('shell-completions/_mullvad') + '=/usr/local/share/zsh/site-functions/_mullvad', - distAssets('shell-completions/mullvad.fish') + + buildAssets('shell-completions/_mullvad') + '=/usr/local/share/zsh/site-functions/_mullvad', + buildAssets('shell-completions/mullvad.fish') + '=/usr/share/fish/vendor_completions.d/mullvad.fish', ], afterInstall: distAssets('linux/after-install.sh'), @@ -215,10 +215,10 @@ const config = { distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-daemon')) + '=/usr/bin/', distAssets(path.join(getLinuxTargetSubdir(), 'mullvad-exclude')) + '=/usr/bin/', distAssets('linux/problem-report-link') + '=/usr/bin/mullvad-problem-report', - distAssets('shell-completions/mullvad.bash') + + buildAssets('shell-completions/mullvad.bash') + '=/usr/share/bash-completion/completions/mullvad', - distAssets('shell-completions/_mullvad') + '=/usr/share/zsh/site-functions/_mullvad', - distAssets('shell-completions/mullvad.fish') + + buildAssets('shell-completions/_mullvad') + '=/usr/share/zsh/site-functions/_mullvad', + buildAssets('shell-completions/mullvad.fish') + '=/usr/share/fish/vendor_completions.d/mullvad.fish', ], afterInstall: distAssets('linux/after-install.sh'), @@ -371,6 +371,10 @@ function packLinux() { }); } +function buildAssets(relativePath) { + return path.join(path.resolve(__dirname, '../../build'), relativePath); +} + function distAssets(relativePath) { return path.join(path.resolve(__dirname, '../../dist-assets'), relativePath); } |
