mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-17 21:24:40 +10:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f05272f2d0 | ||
|
|
383b7ef4f8 | ||
|
|
2874277aa4 | ||
|
|
8883466ef5 |
8
.github/workflows/windows.yml
vendored
8
.github/workflows/windows.yml
vendored
@@ -96,3 +96,11 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
|
||||||
GITHUB_USERNAME: ${{ github.repository_owner }}
|
GITHUB_USERNAME: ${{ github.repository_owner }}
|
||||||
|
|
||||||
|
- if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||||
|
name: Release to WinGet
|
||||||
|
uses: vedantmgoyal2009/winget-releaser@latest
|
||||||
|
with:
|
||||||
|
identifier: VSCodium.VSCodium
|
||||||
|
release-tag: env.MS_TAG
|
||||||
|
installers-regex: '\.exe$' # only .exe files
|
||||||
|
token: ${{ secrets.STRONGER_GITHUB_TOKEN }}
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
vscode
|
vscode
|
||||||
VS*/*
|
VS*/*
|
||||||
|
VSCode*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
build/linux/appimage/out
|
build/linux/appimage/out
|
||||||
build/linux/appimage/pkg2appimage.AppDir
|
build/linux/appimage/pkg2appimage.AppDir
|
||||||
|
|||||||
20
build/update_api.sh
Executable file
20
build/update_api.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
URL=`curl -s "https://update.code.visualstudio.com/api/update/win32-x64-archive/stable/VERSION" | jq -c '.url' | sed -E 's/.*"([^"]+)".*/\1/'`
|
||||||
|
# echo "url: ${URL}"
|
||||||
|
FILE=`echo "${URL}" | sed -E 's|.*/([^/]+\.zip)$|\1|'`
|
||||||
|
# echo "file: ${FILE}"
|
||||||
|
DIRECTORY=`echo "${URL}" | sed -E 's|.*/([^/]+)\.zip$|\1|'`
|
||||||
|
# echo "directory: ${DIRECTORY}"
|
||||||
|
|
||||||
|
if [[ ! -f "${FILE}" ]]; then
|
||||||
|
wget "${URL}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -d "${DIRECTORY}" ]]; then
|
||||||
|
unzip "${FILE}" -d "${DIRECTORY}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
APIS=`cat ${DIRECTORY}/resources/app/product.json | jq -r '.extensionEnabledApiProposals'`
|
||||||
|
|
||||||
|
cat <<< $(jq --argjson v "${APIS}" 'setpath(["extensionEnabledApiProposals"]; $v)' product.json) > product.json
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
- dpkg
|
- dpkg
|
||||||
- python3
|
- python3
|
||||||
- imagemagick (for AppImage)
|
- imagemagick (for AppImage)
|
||||||
|
- ripgrep
|
||||||
|
|
||||||
### <a id="dependencies-macos"></a>MacOS
|
### <a id="dependencies-macos"></a>MacOS
|
||||||
|
|
||||||
@@ -65,6 +66,10 @@ Firstly, create the container with:
|
|||||||
```
|
```
|
||||||
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-x64 bash
|
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-x64 bash
|
||||||
```
|
```
|
||||||
|
like
|
||||||
|
```
|
||||||
|
docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-x64 bash
|
||||||
|
```
|
||||||
|
|
||||||
When inside the container, you can use the following commands to build:
|
When inside the container, you can use the following commands to build:
|
||||||
```
|
```
|
||||||
@@ -90,6 +95,10 @@ Firstly, create the container with:
|
|||||||
```
|
```
|
||||||
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
|
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
|
||||||
```
|
```
|
||||||
|
like
|
||||||
|
```
|
||||||
|
docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
|
||||||
|
```
|
||||||
|
|
||||||
When inside the container, you can use the following commands to build:
|
When inside the container, you can use the following commands to build:
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,5 +1,31 @@
|
|||||||
|
diff --git a/build/linux/debian/dependencies-generator.js b/build/linux/debian/dependencies-generator.js
|
||||||
|
index 235ca26..4f0f06e 100644
|
||||||
|
--- a/build/linux/debian/dependencies-generator.js
|
||||||
|
+++ b/build/linux/debian/dependencies-generator.js
|
||||||
|
@@ -17,7 +17,7 @@ const dep_lists_1 = require("./dep-lists");
|
||||||
|
// If true, we fail the build if there are new dependencies found during that task.
|
||||||
|
// The reference dependencies, which one has to update when the new dependencies
|
||||||
|
// are valid, are in dep-lists.ts
|
||||||
|
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES = true;
|
||||||
|
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES = false;
|
||||||
|
function getDependencies(buildDir, applicationName, arch, sysroot) {
|
||||||
|
// Get the files for which we want to find dependencies.
|
||||||
|
const nativeModulesPath = path.join(buildDir, 'resources', 'app', 'node_modules.asar.unpacked');
|
||||||
|
diff --git a/build/linux/debian/dependencies-generator.ts b/build/linux/debian/dependencies-generator.ts
|
||||||
|
index 9e3d466..776a4c2 100644
|
||||||
|
--- a/build/linux/debian/dependencies-generator.ts
|
||||||
|
+++ b/build/linux/debian/dependencies-generator.ts
|
||||||
|
@@ -19,7 +19,7 @@ import { ArchString } from './types';
|
||||||
|
// If true, we fail the build if there are new dependencies found during that task.
|
||||||
|
// The reference dependencies, which one has to update when the new dependencies
|
||||||
|
// are valid, are in dep-lists.ts
|
||||||
|
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = true;
|
||||||
|
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = false;
|
||||||
|
|
||||||
|
export function getDependencies(buildDir: string, applicationName: string, arch: ArchString, sysroot: string): string[] {
|
||||||
|
// Get the files for which we want to find dependencies.
|
||||||
diff --git a/build/linux/rpm/dependencies-generator.js b/build/linux/rpm/dependencies-generator.js
|
diff --git a/build/linux/rpm/dependencies-generator.js b/build/linux/rpm/dependencies-generator.js
|
||||||
index 1d91eb8..ed6b775 100644
|
index 90cfca9..c92579e 100644
|
||||||
--- a/build/linux/rpm/dependencies-generator.js
|
--- a/build/linux/rpm/dependencies-generator.js
|
||||||
+++ b/build/linux/rpm/dependencies-generator.js
|
+++ b/build/linux/rpm/dependencies-generator.js
|
||||||
@@ -16,7 +16,7 @@ const dep_lists_1 = require("./dep-lists");
|
@@ -16,7 +16,7 @@ const dep_lists_1 = require("./dep-lists");
|
||||||
@@ -12,10 +38,10 @@ index 1d91eb8..ed6b775 100644
|
|||||||
// Get the files for which we want to find dependencies.
|
// Get the files for which we want to find dependencies.
|
||||||
const nativeModulesPath = path.join(buildDir, 'resources', 'app', 'node_modules.asar.unpacked');
|
const nativeModulesPath = path.join(buildDir, 'resources', 'app', 'node_modules.asar.unpacked');
|
||||||
diff --git a/build/linux/rpm/dependencies-generator.ts b/build/linux/rpm/dependencies-generator.ts
|
diff --git a/build/linux/rpm/dependencies-generator.ts b/build/linux/rpm/dependencies-generator.ts
|
||||||
index 95953ec..f5ffc2e 100644
|
index 4b84640..55429fb 100644
|
||||||
--- a/build/linux/rpm/dependencies-generator.ts
|
--- a/build/linux/rpm/dependencies-generator.ts
|
||||||
+++ b/build/linux/rpm/dependencies-generator.ts
|
+++ b/build/linux/rpm/dependencies-generator.ts
|
||||||
@@ -18,7 +18,7 @@ import { ArchString } from './types';
|
@@ -16,7 +16,7 @@ import { ArchString } from './types';
|
||||||
// If true, we fail the build if there are new dependencies found during that task.
|
// If true, we fail the build if there are new dependencies found during that task.
|
||||||
// The reference dependencies, which one has to update when the new dependencies
|
// The reference dependencies, which one has to update when the new dependencies
|
||||||
// are valid, are in dep-lists.ts
|
// are valid, are in dep-lists.ts
|
||||||
@@ -25,10 +51,10 @@ index 95953ec..f5ffc2e 100644
|
|||||||
export function getDependencies(buildDir: string, applicationName: string, arch: ArchString): string[] {
|
export function getDependencies(buildDir: string, applicationName: string, arch: ArchString): string[] {
|
||||||
// Get the files for which we want to find dependencies.
|
// Get the files for which we want to find dependencies.
|
||||||
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
|
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
|
||||||
index 5b7eadb..87c914d 100644
|
index 00ddb6f..cea0e97 100644
|
||||||
--- a/resources/linux/rpm/code.spec.template
|
--- a/resources/linux/rpm/code.spec.template
|
||||||
+++ b/resources/linux/rpm/code.spec.template
|
+++ b/resources/linux/rpm/code.spec.template
|
||||||
@@ -74,3 +74,5 @@ update-mime-database /usr/share/mime &> /dev/null || :
|
@@ -72,3 +72,5 @@ update-mime-database /usr/share/mime &> /dev/null || :
|
||||||
/usr/share/pixmaps/@@ICON@@.png
|
/usr/share/pixmaps/@@ICON@@.png
|
||||||
/usr/share/bash-completion/completions/@@NAME@@
|
/usr/share/bash-completion/completions/@@NAME@@
|
||||||
/usr/share/zsh/site-functions/_@@NAME@@
|
/usr/share/zsh/site-functions/_@@NAME@@
|
||||||
78
product.json
78
product.json
@@ -51,7 +51,8 @@
|
|||||||
"testObserver"
|
"testObserver"
|
||||||
],
|
],
|
||||||
"VisualStudioExptTeam.vscodeintellicode-completions": [
|
"VisualStudioExptTeam.vscodeintellicode-completions": [
|
||||||
"inlineCompletions"
|
"inlineCompletionsNew",
|
||||||
|
"inlineCompletionsAdditions"
|
||||||
],
|
],
|
||||||
"ms-vsliveshare.vsliveshare": [
|
"ms-vsliveshare.vsliveshare": [
|
||||||
"contribMenuBarHome",
|
"contribMenuBarHome",
|
||||||
@@ -61,13 +62,12 @@
|
|||||||
"findTextInFiles",
|
"findTextInFiles",
|
||||||
"notebookCellExecutionState",
|
"notebookCellExecutionState",
|
||||||
"notebookContentProvider",
|
"notebookContentProvider",
|
||||||
"notebookDocumentEvents",
|
|
||||||
"notebookEditor",
|
"notebookEditor",
|
||||||
"notebookEditorEdit",
|
"notebookEditorEdit",
|
||||||
"notebookLiveShare",
|
"notebookLiveShare",
|
||||||
|
"notebookWorkspaceEdit",
|
||||||
"terminalDimensions",
|
"terminalDimensions",
|
||||||
"terminalDataWriteEvent",
|
"terminalDataWriteEvent",
|
||||||
"textDocumentNotebook",
|
|
||||||
"textSearchProvider"
|
"textSearchProvider"
|
||||||
],
|
],
|
||||||
"ms-vscode.js-debug": [
|
"ms-vscode.js-debug": [
|
||||||
@@ -82,25 +82,20 @@
|
|||||||
],
|
],
|
||||||
"ms-python.python": [
|
"ms-python.python": [
|
||||||
"quickPickSortByLabel",
|
"quickPickSortByLabel",
|
||||||
"testObserver",
|
"testObserver"
|
||||||
"notebookEditor"
|
|
||||||
],
|
],
|
||||||
"ms-dotnettools.dotnet-interactive-vscode": [
|
"ms-dotnettools.dotnet-interactive-vscode": [
|
||||||
"notebookConcatTextDocument",
|
|
||||||
"notebookContentProvider",
|
|
||||||
"notebookCellExecutionState",
|
"notebookCellExecutionState",
|
||||||
"notebookControllerKind",
|
"notebookControllerKind",
|
||||||
"notebookDebugOptions",
|
"notebookDebugOptions",
|
||||||
"notebookDeprecated",
|
|
||||||
"notebookEditor",
|
"notebookEditor",
|
||||||
"notebookEditorDecorationType",
|
|
||||||
"notebookEditorEdit",
|
|
||||||
"notebookLiveShare",
|
"notebookLiveShare",
|
||||||
"notebookMessaging",
|
"notebookMessaging",
|
||||||
"notebookMime",
|
"notebookMime",
|
||||||
"textDocumentNotebook"
|
"notebookWorkspaceEdit"
|
||||||
],
|
],
|
||||||
"GitHub.codespaces": [
|
"GitHub.codespaces": [
|
||||||
|
"contribEditSessions",
|
||||||
"contribMenuBarHome",
|
"contribMenuBarHome",
|
||||||
"contribRemoteHelp",
|
"contribRemoteHelp",
|
||||||
"contribViewsRemote",
|
"contribViewsRemote",
|
||||||
@@ -112,10 +107,10 @@
|
|||||||
"ms-vscode.azure-repos": [
|
"ms-vscode.azure-repos": [
|
||||||
"extensionRuntime",
|
"extensionRuntime",
|
||||||
"fileSearchProvider",
|
"fileSearchProvider",
|
||||||
"resolvers",
|
|
||||||
"textSearchProvider"
|
"textSearchProvider"
|
||||||
],
|
],
|
||||||
"ms-vscode.remote-repositories": [
|
"ms-vscode.remote-repositories": [
|
||||||
|
"contribEditSessions",
|
||||||
"contribRemoteHelp",
|
"contribRemoteHelp",
|
||||||
"contribMenuBarHome",
|
"contribMenuBarHome",
|
||||||
"contribViewsRemote",
|
"contribViewsRemote",
|
||||||
@@ -128,14 +123,7 @@
|
|||||||
"scmSelectedProvider",
|
"scmSelectedProvider",
|
||||||
"scmValidation",
|
"scmValidation",
|
||||||
"textSearchProvider",
|
"textSearchProvider",
|
||||||
"timeline",
|
"timeline"
|
||||||
"notebookEditor"
|
|
||||||
],
|
|
||||||
"ms-vscode.vscode-github-issue-notebooks": [
|
|
||||||
"notebookEditor"
|
|
||||||
],
|
|
||||||
"tanhakabir.rest-book": [
|
|
||||||
"notebookEditor"
|
|
||||||
],
|
],
|
||||||
"ms-vscode-remote.remote-wsl": [
|
"ms-vscode-remote.remote-wsl": [
|
||||||
"resolvers",
|
"resolvers",
|
||||||
@@ -148,6 +136,10 @@
|
|||||||
"contribViewsRemote",
|
"contribViewsRemote",
|
||||||
"telemetry"
|
"telemetry"
|
||||||
],
|
],
|
||||||
|
"ms-vscode.remote-server": [
|
||||||
|
"resolvers",
|
||||||
|
"contribViewsRemote"
|
||||||
|
],
|
||||||
"ms-vscode-remote.remote-containers": [
|
"ms-vscode-remote.remote-containers": [
|
||||||
"resolvers",
|
"resolvers",
|
||||||
"workspaceTrust",
|
"workspaceTrust",
|
||||||
@@ -164,15 +156,18 @@
|
|||||||
"documentFiltersExclusive"
|
"documentFiltersExclusive"
|
||||||
],
|
],
|
||||||
"GitHub.vscode-pull-request-github": [
|
"GitHub.vscode-pull-request-github": [
|
||||||
"tokenInformation"
|
"tokenInformation",
|
||||||
|
"commentsResolvedState",
|
||||||
|
"badges",
|
||||||
|
"contribViewSize"
|
||||||
],
|
],
|
||||||
"GitHub.copilot": [
|
"GitHub.copilot": [
|
||||||
"inlineCompletions",
|
"inlineCompletionsNew",
|
||||||
"textDocumentNotebook"
|
"inlineCompletionsAdditions"
|
||||||
],
|
],
|
||||||
"GitHub.copilot-nightly": [
|
"GitHub.copilot-nightly": [
|
||||||
"inlineCompletions",
|
"inlineCompletionsNew",
|
||||||
"textDocumentNotebook"
|
"inlineCompletionsAdditions"
|
||||||
],
|
],
|
||||||
"GitHub.remotehub": [
|
"GitHub.remotehub": [
|
||||||
"contribRemoteHelp",
|
"contribRemoteHelp",
|
||||||
@@ -184,12 +179,10 @@
|
|||||||
"fileSearchProvider",
|
"fileSearchProvider",
|
||||||
"quickPickSortByLabel",
|
"quickPickSortByLabel",
|
||||||
"workspaceTrust",
|
"workspaceTrust",
|
||||||
"resolvers",
|
|
||||||
"scmSelectedProvider",
|
"scmSelectedProvider",
|
||||||
"scmValidation",
|
"scmValidation",
|
||||||
"textSearchProvider",
|
"textSearchProvider",
|
||||||
"timeline",
|
"timeline"
|
||||||
"notebookEditor"
|
|
||||||
],
|
],
|
||||||
"GitHub.remotehub-insiders": [
|
"GitHub.remotehub-insiders": [
|
||||||
"contribRemoteHelp",
|
"contribRemoteHelp",
|
||||||
@@ -201,42 +194,35 @@
|
|||||||
"fileSearchProvider",
|
"fileSearchProvider",
|
||||||
"quickPickSortByLabel",
|
"quickPickSortByLabel",
|
||||||
"workspaceTrust",
|
"workspaceTrust",
|
||||||
"resolvers",
|
|
||||||
"scmSelectedProvider",
|
"scmSelectedProvider",
|
||||||
"scmValidation",
|
"scmValidation",
|
||||||
"textSearchProvider",
|
"textSearchProvider",
|
||||||
"timeline",
|
"timeline"
|
||||||
"notebookEditor"
|
|
||||||
],
|
],
|
||||||
"ms-python.gather": [
|
"ms-python.gather": [
|
||||||
"notebookEditor",
|
|
||||||
"notebookCellExecutionState"
|
"notebookCellExecutionState"
|
||||||
],
|
],
|
||||||
"ms-python.vscode-pylance": [
|
"ms-python.vscode-pylance": [
|
||||||
"notebookDocumentEvents",
|
|
||||||
"notebookEditor",
|
"notebookEditor",
|
||||||
"notebookCellExecutionState"
|
"notebookCellExecutionState"
|
||||||
],
|
],
|
||||||
"ms-toolsai.jupyter": [
|
"ms-toolsai.jupyter": [
|
||||||
"notebookConcatTextDocument",
|
|
||||||
"notebookControllerKind",
|
"notebookControllerKind",
|
||||||
"notebookDebugOptions",
|
"notebookDebugOptions",
|
||||||
"notebookDeprecated",
|
"notebookDeprecated",
|
||||||
"notebookEditor",
|
"notebookWorkspaceEdit",
|
||||||
"notebookDocumentEvents",
|
|
||||||
"notebookEditorDecorationType",
|
|
||||||
"notebookEditorEdit",
|
|
||||||
"notebookMessaging",
|
"notebookMessaging",
|
||||||
"notebookMime",
|
"notebookMime",
|
||||||
"notebookCellExecutionState",
|
"notebookCellExecutionState",
|
||||||
"portsAttributes",
|
"portsAttributes",
|
||||||
"textDocumentNotebook",
|
"quickPickSortByLabel",
|
||||||
"quickPickSortByLabel"
|
"notebookKernelSource",
|
||||||
|
"interactiveWindow"
|
||||||
|
],
|
||||||
|
"ms-toolsai.vscode-jupyter-powertoys": [
|
||||||
|
"notebookWorkspaceEdit"
|
||||||
],
|
],
|
||||||
"dbaeumer.vscode-eslint": [
|
"dbaeumer.vscode-eslint": [
|
||||||
"tabs",
|
|
||||||
"notebookDocumentEvents",
|
|
||||||
"notebookEditor",
|
|
||||||
"notebookCellExecutionState"
|
"notebookCellExecutionState"
|
||||||
],
|
],
|
||||||
"ms-vscode.azure-sphere-tools-ui": [
|
"ms-vscode.azure-sphere-tools-ui": [
|
||||||
@@ -244,6 +230,12 @@
|
|||||||
],
|
],
|
||||||
"ms-azuretools.vscode-azureappservice": [
|
"ms-azuretools.vscode-azureappservice": [
|
||||||
"terminalDataWriteEvent"
|
"terminalDataWriteEvent"
|
||||||
|
],
|
||||||
|
"ms-vscode.anycode": [
|
||||||
|
"extensionsAny"
|
||||||
|
],
|
||||||
|
"ms-vscode.cpptools": [
|
||||||
|
"terminalDataWriteEvent"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extensionKind": {
|
"extensionKind": {
|
||||||
|
|||||||
@@ -1,17 +1,44 @@
|
|||||||
# mobile.events.data.microsoft.com
|
#!/bin/bash
|
||||||
# vortex.data.microsoft.com
|
|
||||||
TELEMETRY_URLS="[^/]+\.data\.microsoft\.com"
|
|
||||||
REPLACEMENT="s/${TELEMETRY_URLS}/0\.0\.0\.0/g"
|
|
||||||
|
|
||||||
#include common functions
|
set -ex
|
||||||
|
|
||||||
|
# list of urls to match:
|
||||||
|
# - mobile.events.data.microsoft.com
|
||||||
|
# - vortex.data.microsoft.com
|
||||||
|
|
||||||
|
SEARCH="\.data\.microsoft\.com"
|
||||||
|
REPLACEMENT="s|//[^/]+\.data\.microsoft\.com|//0\.0\.0\.0|g"
|
||||||
|
|
||||||
|
# include common functions
|
||||||
. ../utils.sh
|
. ../utils.sh
|
||||||
|
|
||||||
if [[ "${OS_NAME}" == "osx" ]]; then
|
if is_gnu_sed; then
|
||||||
if is_gnu_sed; then
|
replace_with_debug () {
|
||||||
grep -rl --exclude-dir=.git -E "${TELEMETRY_URLS}" . | xargs sed -i -E "${REPLACEMENT}"
|
echo "found: ${2} (`date`)"
|
||||||
else
|
sed -i -E "${1}" "${2}"
|
||||||
grep -rl --exclude-dir=.git -E "${TELEMETRY_URLS}" . | xargs sed -i '' -E "${REPLACEMENT}"
|
}
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
grep -rl --exclude-dir=.git -E "${TELEMETRY_URLS}" . | xargs sed -i -E "${REPLACEMENT}"
|
replace_with_debug () {
|
||||||
|
echo "found: ${2} (`date`)"
|
||||||
|
sed -i '' -E "${1}" "${2}"
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
export -f replace_with_debug
|
||||||
|
|
||||||
|
d1=`date +%s`
|
||||||
|
|
||||||
|
if [[ "${OS_NAME}" == "linux" ]]; then
|
||||||
|
if [[ ${VSCODE_ARCH} == "x64" ]]; then
|
||||||
|
rg --no-ignore -l "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
|
||||||
|
else
|
||||||
|
grep -rl --exclude-dir=.git -E "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
|
||||||
|
fi
|
||||||
|
elif [[ "${OS_NAME}" == "osx" ]]; then
|
||||||
|
./node_modules/@vscode/ripgrep/bin/rg --no-ignore -l "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
|
||||||
|
else
|
||||||
|
./node_modules/@vscode/ripgrep/bin/rg --no-ignore --path-separator=// -l "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
d2=`date +%s`
|
||||||
|
|
||||||
|
echo "undo_telemetry: $( echo $((${d2} - ${d1})) )s"
|
||||||
|
|||||||
Reference in New Issue
Block a user