mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 01:37:20 +00:00
Merge commit 'refs/pull/66181/head' of github.com:microsoft/vscode into pr/66181
This commit is contained in:
commit
a4e350f76f
5 changed files with 29 additions and 20 deletions
|
@ -365,7 +365,12 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
|||
.pipe(electron(_.extend({}, config, { platform, arch, ffmpegChromium: true })))
|
||||
.pipe(filter(['**', '!LICENSE', '!LICENSES.chromium.html', '!version'], { dot: true }));
|
||||
|
||||
// result = es.merge(result, gulp.src('resources/completions/**', { base: '.' }));
|
||||
result = es.merge(result, gulp.src('resources/completions/bash/code', { base: '.' })
|
||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
.pipe(rename(function (f) { f.basename = product.applicationName; })));
|
||||
result = es.merge(result, gulp.src('resources/completions/zsh/_code', { base: '.' })
|
||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
.pipe(rename(function (f) { f.basename = '_' + product.applicationName; })));
|
||||
|
||||
if (platform === 'win32') {
|
||||
result = es.merge(result, gulp.src('resources/win32/bin/code.js', { base: 'resources/win32', allowEmpty: true }));
|
||||
|
|
|
@ -54,11 +54,13 @@ function prepareDebPackage(arch) {
|
|||
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
||||
.pipe(rename('usr/share/pixmaps/' + product.linuxIconName + '.png'));
|
||||
|
||||
// const bash_completion = gulp.src('resources/completions/bash/code')
|
||||
// .pipe(rename('usr/share/bash-completion/completions/code'));
|
||||
const bash_completion = gulp.src('resources/completions/bash/code')
|
||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
.pipe(rename('usr/share/bash-completion/completions/' + product.applicationName));
|
||||
|
||||
// const zsh_completion = gulp.src('resources/completions/zsh/_code')
|
||||
// .pipe(rename('usr/share/zsh/vendor-completions/_code'));
|
||||
const zsh_completion = gulp.src('resources/completions/zsh/_code')
|
||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
.pipe(rename('usr/share/zsh/vendor-completions/_' + product.applicationName));
|
||||
|
||||
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
|
||||
.pipe(rename(function (p) { p.dirname = 'usr/share/' + product.applicationName + '/' + p.dirname; }));
|
||||
|
@ -94,7 +96,7 @@ function prepareDebPackage(arch) {
|
|||
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
|
||||
.pipe(rename('DEBIAN/postinst'));
|
||||
|
||||
const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, icon, /* bash_completion, zsh_completion, */ code);
|
||||
const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, icon, bash_completion, zsh_completion, code);
|
||||
|
||||
return all.pipe(vfs.dest(destination));
|
||||
};
|
||||
|
@ -144,11 +146,13 @@ function prepareRpmPackage(arch) {
|
|||
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
||||
.pipe(rename('BUILD/usr/share/pixmaps/' + product.linuxIconName + '.png'));
|
||||
|
||||
// const bash_completion = gulp.src('resources/completions/bash/code')
|
||||
// .pipe(rename('BUILD/usr/share/bash-completion/completions/code'));
|
||||
const bash_completion = gulp.src('resources/completions/bash/code')
|
||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
.pipe(rename('BUILD/usr/share/bash-completion/completions/' + product.applicationName));
|
||||
|
||||
// const zsh_completion = gulp.src('resources/completions/zsh/_code')
|
||||
// .pipe(rename('BUILD/usr/share/zsh/site-functions/_code'));
|
||||
const zsh_completion = gulp.src('resources/completions/zsh/_code')
|
||||
.pipe(replace('@@APPNAME@@', product.applicationName))
|
||||
.pipe(rename('BUILD/usr/share/zsh/site-functions/_' + product.applicationName));
|
||||
|
||||
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
|
||||
.pipe(rename(function (p) { p.dirname = 'BUILD/usr/share/' + product.applicationName + '/' + p.dirname; }));
|
||||
|
@ -171,7 +175,7 @@ function prepareRpmPackage(arch) {
|
|||
const specIcon = gulp.src('resources/linux/rpm/code.xpm', { base: '.' })
|
||||
.pipe(rename('SOURCES/' + product.applicationName + '.xpm'));
|
||||
|
||||
const all = es.merge(code, desktops, appdata, icon, /* bash_completion, zsh_completion, */ spec, specIcon);
|
||||
const all = es.merge(code, desktops, appdata, icon, bash_completion, zsh_completion, spec, specIcon);
|
||||
|
||||
return all.pipe(vfs.dest(getRpmBuildPath(rpmArch)));
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_code()
|
||||
_@@APPNAME@@()
|
||||
{
|
||||
local cur prev words cword split
|
||||
_init_completion -s || return
|
||||
|
@ -58,4 +58,4 @@ _code()
|
|||
|
||||
_filedir
|
||||
} &&
|
||||
complete -F _code code
|
||||
complete -F _@@APPNAME@@ @@APPNAME@@
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#compdef code
|
||||
#compdef @@APPNAME@@
|
||||
|
||||
local arguments
|
||||
|
||||
|
|
|
@ -18,14 +18,14 @@ Visual Studio Code is a new choice of tool that combines the simplicity of a cod
|
|||
mkdir -p %{buildroot}/usr/share/@@NAME@@
|
||||
mkdir -p %{buildroot}/usr/share/applications
|
||||
mkdir -p %{buildroot}/usr/share/pixmaps
|
||||
#mkdir -p %{buildroot}/usr/share/bash-completion/completions
|
||||
#mkdir -p %{buildroot}/usr/share/zsh/site-functions
|
||||
mkdir -p %{buildroot}/usr/share/bash-completion/completions
|
||||
mkdir -p %{buildroot}/usr/share/zsh/site-functions
|
||||
cp -r usr/share/@@NAME@@/* %{buildroot}/usr/share/@@NAME@@
|
||||
cp -r usr/share/applications/@@NAME@@.desktop %{buildroot}/usr/share/applications
|
||||
cp -r usr/share/applications/@@NAME@@-url-handler.desktop %{buildroot}/usr/share/applications
|
||||
cp -r usr/share/pixmaps/@@ICON@@.png %{buildroot}/usr/share/pixmaps
|
||||
#cp usr/share/bash-completion/completions/code %{buildroot}/usr/share/bash-completion/completions/code
|
||||
#cp usr/share/zsh/site-functions/_code %{buildroot}/usr/share/zsh/site-functions/_code
|
||||
cp usr/share/bash-completion/completions/@@NAME@@ %{buildroot}/usr/share/bash-completion/completions/@@NAME@@
|
||||
cp usr/share/zsh/site-functions/_@@NAME@@ %{buildroot}/usr/share/zsh/site-functions/_@@NAME@@
|
||||
|
||||
%post
|
||||
# Remove the legacy bin command if this is the stable build
|
||||
|
@ -58,5 +58,5 @@ fi
|
|||
/usr/share/applications/@@NAME@@.desktop
|
||||
/usr/share/applications/@@NAME@@-url-handler.desktop
|
||||
/usr/share/pixmaps/@@ICON@@.png
|
||||
#/usr/share/bash-completion/completions/code
|
||||
#/usr/share/zsh/site-functions/_code
|
||||
/usr/share/bash-completion/completions/@@NAME@@
|
||||
/usr/share/zsh/site-functions/_@@NAME@@
|
||||
|
|
Loading…
Reference in a new issue