Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update some extensions; fix update-from-ovsx script #80

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .ci/extension_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
#
# Copyright (c) 2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# This script is used to check for updates to the Visual Studio plugins listed in plugin-config.json.

set -ex

echo "Checking for updates to the Visual Studio plugins listed in plugin-config.json"

MAIN_BRANCH="devspaces-3-rhel-8"
curl -sSLo plugin-config-main.json https://raw.githubusercontent.com/redhat-developer/devspaces-vscode-extensions/$MAIN_BRANCH/plugin-config.json

pluginsConfig=$(jq -r '.Plugins | keys[]' <plugin-config.json)
pluginsConfigMain=$(jq -r '.Plugins | keys[]' <plugin-config-main.json)

for plugin in $pluginsConfig; do
# If it is a new extension and doesn't exist in the main branch, try to build it
if [[ ! " ${pluginsConfigMain[*]} " =~ $plugin ]]; then
echo "New extension found: $plugin"
echo "Building $plugin"
./build/build.sh "$plugin" --clean
continue
fi
# If it is an existing extension, check if the revision has changed
revision=$(jq -r --arg plugin "$plugin" '.Plugins[$plugin].revision' <plugin-config.json)
revisionMain=$(jq -r --arg plugin "$plugin" '.Plugins[$plugin].revision' <plugin-config-main.json)
if [[ "${revision}" != "${revisionMain}" ]]; then
echo "Revision changed for $plugin"
echo "Building $plugin"
./build/build.sh "$plugin" --clean
fi
done
7 changes: 3 additions & 4 deletions .github/workflows/extension-pr-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
# SPDX-License-Identifier: EPL-2.0
#

name: Extension Build
name: Updated Extensions Build
on:
pull_request:
paths:
- '**/extension.json'
- '**/Dockerfile'
- 'plugin-config.json'

jobs:
build-push:
Expand All @@ -27,7 +26,7 @@ jobs:

- name: Build extension
run: |
./.ci/extension_build_publish.sh build-publish origin/${{ github.base_ref }} ${{ github.event.pull_request.head.sha }}
./.ci/extension_build.sh
- name: Upload artifacts
Expand Down
1 change: 1 addition & 0 deletions atlassian.atlascode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RUN npm install -g ${extension_manager}
RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \
git clone ${extension_repository} ${extension_name} && \
cd ./${extension_name} && git checkout ${extension_revision} && \
sed -i 's/NODE_OPTIONS=--openssl-legacy-provider//' package.json && \
npm install -g @vscode/vsce@${extension_vsce} [email protected] && \
if [[ -f yarn.lock ]]; then yarn install; \
else npm install --unsafe-perm=true --allow-root; fi && \
Expand Down
6 changes: 3 additions & 3 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
#
# Copyright (c) 2023 Red Hat, Inc.
# Copyright (c) 2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down Expand Up @@ -53,9 +53,9 @@ EXTENSION_REPOSITORY=$(parse_json repository)
EXTENSION_REVISION=$(parse_json revision)

#Defaults
ubi8Image="nodejs-18:1-71.1698060565"
ubi8Image="nodejs-18:1-102"
packageManager="npm@latest"
vsceVersion="2.17.0"
vsceVersion="2.26.0"

EXTENSION_IMAGE=$(parse_json ubi8Image)
if [[ $EXTENSION_IMAGE -eq "null" ]]; then
Expand Down
19 changes: 7 additions & 12 deletions build/update-from-ovsx.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2023 Red Hat, Inc.
# Copyright (c) 2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand All @@ -25,7 +25,6 @@ usage()
Requires:
- plugin-config.json (redhat-developer/devspaces-vscode-extensions)
- openvsx-sync.json (redhat-developer/devspaces/dependencies/che-plugin-registry)
- download_vsix.sh (redhat-developer/devspaces/dependencies/che-plugin-registry)
They will be downloaded if not found."
exit
Expand All @@ -41,19 +40,19 @@ while [[ "$#" -gt 0 ]]; do
done

if [[ ! "${MIDSTM_BRANCH}" ]]; then
MIDSTM_BRANCHh="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || true)"
MIDSTM_BRANCH="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || true)"
if [[ $MIDSTM_BRANCH != "devspaces-3."*"-rhel-8" ]]; then
MIDSTM_BRANCH="devspaces-3-rhel-8"
fi
fi

# Check for openvsx-sync.json, plugin-config.json and download-vsix.sh
# cleanup any previous runs
rm -rf /tmp/vsix-sources/

# Check for openvsx-sync.json, plugin-config.json
if [[ ! -f openvsx-sync.json ]]; then
curl -sSLO https://raw.githubusercontent.com/redhat-developer/devspaces/$MIDSTM_BRANCH/dependencies/che-plugin-registry/openvsx-sync.json
fi
if [[ ! -f download_vsix.sh ]]; then
curl -sSLO https://raw.githubusercontent.com/redhat-developer/devspaces/$MIDSTM_BRANCH/dependencies/che-plugin-registry/build/scripts/download_vsix.sh
fi
if [[ ! -f plugin-config.json ]]; then
curl -sSLO https://raw.githubusercontent.com/redhat-developer/devspaces-vscode-extensions/$MIDSTM_BRANCH/plugin-config.json
fi
Expand All @@ -67,11 +66,7 @@ replaceField()
echo "${changed}" > "plugin-config.json"
}

# Update openvsx-sync.json
chmod +x -R *.sh
./download_vsix.sh -b $MIDSTM_BRANCH -j ./openvsx-sync.json --no-download

# Read in openvsx-sync.sh to get list of pluginregistry plugins
# Read in openvsx-sync.json to get list of pluginregistry plugins
pluginsOVSX=$(cat openvsx-sync.json | jq -r '.[].id')
pluginsConfig=$(cat plugin-config.json | jq -r '.Plugins | keys[]')

Expand Down
5 changes: 2 additions & 3 deletions felixfbecker.php-debug/Dockerfile → golang.go/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Red Hat, Inc.
# Copyright (c) 2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand All @@ -24,10 +24,9 @@ RUN npm install -g ${extension_manager}

RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \
git clone ${extension_repository} ${extension_name} && \
cd ./${extension_name} && git checkout ${extension_revision} && \
cd ./${extension_name} && git checkout ${extension_revision} && cd extension && \
npm install -g @vscode/vsce@${extension_vsce} [email protected] && \
if [[ -f yarn.lock ]]; then yarn install; \
else npm install --unsafe-perm=true --allow-root; fi && \
rm -rf ./.git && tar -czvf /${extension_name}-sources.tar.gz ./ && \
npm run build && \
vsce package --out /${extension_name}.vsix
13 changes: 6 additions & 7 deletions ms-toolsai.jupyter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Red Hat, Inc.
# Copyright (c) 2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand All @@ -25,10 +25,9 @@ RUN npm install -g ${extension_manager}
RUN mkdir ./${extension_name}-src && cd ./${extension_name}-src && \
git clone ${extension_repository} ${extension_name} && \
cd ./${extension_name} && git checkout ${extension_revision} && \
npm install -g @vscode/vsce@${extension_vsce} [email protected] --unsafe-perm=true&& \
npm install --unsafe-perm=true --allow-root && \
dnf module install -y nodejs:16/common && \
npm install @types/vscode react-is crypto --unsafe-perm=true && \
npm install -g @vscode/vsce@${extension_vsce} && \
npm ci --ignore-scripts --prefer-offline --no-audit && \
npm install && \
rm -rf ./.git && tar -czvf /${extension_name}-sources.tar.gz ./ && \
#npm run package
gulp clean && gulp prePublishBundle && vsce package -o /${extension_name}.vsix
npm run package && \
cp ms-toolsai-jupyter-insiders.vsix /${extension_name}.vsix
77 changes: 36 additions & 41 deletions plugin-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"Plugins": {
"atlassian.atlascode": {
"repository": "https://bitbucket.org/atlassianlabs/atlascode",
"revision": "3.0.9",
"revision": "3.0.10",
"update": "true",
"packageManager": "[email protected]"
},
"bmewburn.vscode-intelephense-client": {
"repository": "https://github.com/bmewburn/vscode-intelephense",
"revision": "v1.10.2",
"revision": "v1.10.4",
"update": "true"
},
"dbaeumer.vscode-eslint": {
Expand All @@ -30,7 +30,7 @@
},
"eamodio.gitlens": {
"repository": "https://github.com/gitkraken/vscode-gitlens",
"revision": "v14.8.0",
"revision": "v14.9.1",
"update": "true",
"ubi8Image": "nodejs-16:1-90",
"packageManager": "[email protected]"
Expand All @@ -43,44 +43,39 @@
},
"esbenp.prettier-vscode": {
"repository": "https://github.com/prettier/prettier-vscode",
"revision": "v10.1.0",
"revision": "v10.4.0",
"update": "true",
"packageManager": "[email protected]"
},
"felixfbecker.php-debug": {
"repository": "https://github.com/xdebug/vscode-php-debug",
"revision": "v1.32.1",
"update": "true"
},
"github.vscode-pull-request-github": {
"repository": "https://github.com/microsoft/vscode-pull-request-github",
"revision": "v0.80.0",
"revision": "v0.86.1",
"update": "true",
"packageManager": "[email protected]"
},
"gitlab.gitlab-workflow": {
"repository": "https://gitlab.com/gitlab-org/gitlab-vscode-extension.git/",
"revision": "v4.0.0",
"revision": "v4.9.0",
"update": "true"
},
"golang.go": {
"repository": "https://github.com/golang/vscode-go",
"revision": "v0.40.3",
"revision": "v0.41.4",
"update": "true"
},
"jfrog.jfrog-vscode-extension": {
"repository": "https://github.com/jfrog/jfrog-vscode-extension",
"revision": "2.9.6",
"revision": "2.10.1",
"update": "true"
},
"llvm-vs-code-extensions.vscode-clangd": {
"repository": "https://github.com/clangd/vscode-clangd",
"revision": "0.1.26",
"revision": "0.1.28",
"update": "true"
},
"ms-kubernetes-tools.vscode-kubernetes-tools": {
"repository": "https://github.com/vscode-kubernetes-tools/vscode-kubernetes-tools",
"revision": "1.3.15",
"revision": "1.3.16",
"update": "true"
},
"ms-python.isort": {
Expand All @@ -89,22 +84,21 @@
"update": "true"
},
"ms-python.black-formatter": {
"comment": "Version: 2024.0.0",
"comment": "Version: 2024.2.0",
"repository": "https://github.com/microsoft/vscode-black-formatter",
"revision": "12df4056a0efbf9e320e944c970bcf285d897be3",
"revision": "652cef95031be8a512f01e8c13e924ad7a67ba03",
"update": "true"
},
"ms-python.python": {
"repository": "https://github.com/microsoft/vscode-python",
"revision": "v2024.0.1",
"revision": "v2024.4.1",
"update": "true"
},
"ms-toolsai.jupyter": {
"comment": "Cannot be built due to https://github.com/microsoft/vscode-jupyter/issues/13260, tracked in https://issues.redhat.com/browse/CRW-4325",
"comment": "Version: 2024.3.1",
"repository": "https://github.com/microsoft/vscode-jupyter",
"revision": "4733a075e8af70d358dba81987395c9150fe5802",
"update": "false",
"packageManager": "[email protected]"
"revision": "29b78d8fc33983431f0a01248cd545abcda0d7e4",
"update": "true"
},
"ms-toolsai.jupyter-keymap": {
"comment": "Version: 1.1.2",
Expand All @@ -121,15 +115,15 @@
"packageManager": "[email protected]"
},
"ms-toolsai.vscode-jupyter-cell-tags": {
"comment": "Version: 0.1.8",
"comment": "Version: 0.1.9",
"repository": "https://github.com/Microsoft/vscode-jupyter-cell-tags",
"revision": "5d4f72e96414442cf3afd91d8adb8fa6807fd778",
"revision": "bbc509cd58549ff592943dce340d6d3f84a51e86",
"update": "true"
},
"ms-toolsai.vscode-jupyter-slideshow": {
"comment": "Version: 0.1.5",
"comment": "Version: 0.1.6",
"repository": "https://github.com/Microsoft/vscode-jupyter-slideshow",
"revision": "2cf41f6d1f8c8045a6810ce922378ce731aac806",
"revision": "dd2de712e89ca65f2fbe912f71c1133b52e3f252",
"update": "true"
},
"ms-vscode.js-debug": {
Expand All @@ -151,20 +145,22 @@
"update": "false"
},
"ms-dotnettools.vscode-dotnet-runtime": {
"comment": "Version: 2.0.3",
"repository": "https://github.com/dotnet/vscode-dotnet-runtime",
"revision": "Runtime-v1.7.2",
"revision": "606893d9dde25814ed5e6b0bf3fd9d763281e53d",
"packageManager": "[email protected]",
"update": "false"
"update": "true"
},
"muhammad-sammy.csharp": {
"repository": "https://github.com/muhammadsammy/free-omnisharp-vscode",
"revision": "2.15.30",
"revision": "2.23.15",
"update": "true"
},
"redhat.ansible": {
"comment": "Version: 24.4.0",
"repository": "https://github.com/ansible/vscode-ansible",
"revision": "v2.4",
"update": "false",
"revision": "bd6caef0acc2dc4f5ed0a1a3ab7fec5acd80183d",
"update": "true",
"packageManager": "[email protected]"
},
"redhat.fabric8-analytics": {
Expand Down Expand Up @@ -193,20 +189,19 @@
},
"redhat.vscode-openshift-connector": {
"repository": "https://github.com/redhat-developer/vscode-openshift-tools",
"revision": "1.11.0",
"revision": "1.13.0",
"update": "true"
},
"redhat.vscode-quarkus": {
"comment": "Version: 1.17.0",
"repository": "https://github.com/redhat-developer/vscode-quarkus",
"revision": "v1.17.0",
"update": "true",
"ubi8Image": "nodejs-14:1-101",
"packageManager": "[email protected]"
"revision": "c225c2f85d8f680a8de335bb294013d27f1e7b51",
"update": "true"
},
"redhat.vscode-redhat-account": {
"comment": "Version: 0.1.0",
"comment": "Version: 0.2.0",
"repository": "https://github.com/redhat-developer/vscode-redhat-account",
"revision": "b1e57fae4120291427bfea9685c4b069a2235405",
"revision": "35fa63a507d66dc0c263777b2a020067fabee041",
"update": "true"
},
"redhat.vscode-tekton-pipelines": {
Expand Down Expand Up @@ -238,17 +233,17 @@
},
"timonwong.shellcheck": {
"repository": "https://github.com/vscode-shellcheck/vscode-shellcheck",
"revision": "v0.35.0",
"revision": "v0.37.1",
"update": "true"
},
"vscjava.vscode-java-debug": {
"repository": "https://github.com/microsoft/vscode-java-debug",
"revision": "0.56.0",
"revision": "0.57.0",
"update": "true"
},
"vscjava.vscode-java-test": {
"repository": "https://github.com/microsoft/vscode-java-test",
"revision": "0.40.1",
"revision": "0.41.1",
"update": "true"
},
"xdebug.php-debug": {
Expand Down
Loading
Loading