code-marketplace: auto updated to 1.95.0-1
This commit is contained in:
parent
eedc25f10e
commit
91226bbb39
|
@ -1,6 +1,6 @@
|
||||||
# Maintainer: Sainnhe Park <sainnhe@gmail.com>
|
# Maintainer: Sainnhe Park <sainnhe@gmail.com>
|
||||||
pkgname=code-marketplace
|
pkgname=code-marketplace
|
||||||
pkgver=1.90.0
|
pkgver=1.95.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='Enable vscode marketplace in Code OSS'
|
pkgdesc='Enable vscode marketplace in Code OSS'
|
||||||
arch=('any')
|
arch=('any')
|
||||||
|
@ -14,7 +14,7 @@ source=('code-marketplace.hook'
|
||||||
'patch.json')
|
'patch.json')
|
||||||
md5sums=('ce502275aa945985182b51420fc6037c'
|
md5sums=('ce502275aa945985182b51420fc6037c'
|
||||||
'9ed6f3972479ab6d3d053e7c47ead55a'
|
'9ed6f3972479ab6d3d053e7c47ead55a'
|
||||||
'56531cac5e74070cde3229c0a5e1503b')
|
'63fcab1dcfb25eacc2697cae3d650ff3')
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -Dm 644 "${srcdir}"/code-marketplace.hook "${pkgdir}"/usr/share/libalpm/hooks/code-marketplace.hook
|
install -Dm 644 "${srcdir}"/code-marketplace.hook "${pkgdir}"/usr/share/libalpm/hooks/code-marketplace.hook
|
||||||
|
|
|
@ -504,10 +504,12 @@
|
||||||
"GitHub.copilot": {
|
"GitHub.copilot": {
|
||||||
"onFileOpen": [
|
"onFileOpen": [
|
||||||
{
|
{
|
||||||
"pathGlob": "{**/*.ts,**/*.tsx,**/*.js,**/*.py,**/*.go,**/*.rb}"
|
"pathGlob": "{**/*.ts,**/*.tsx,**/*.js,**/*.jsx,**/*.py,**/*.go,**/*.rb,**/*.html,**/*.css,**/*.php,**/*.cpp,**/*.vue,**/*.c,**/*.sql,**/*.java,**/*.cs,**/*.rs,**/*.dart,**/*.ps,**/*.ps1,**/*.tex}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"onSettingsEditorOpen": {}
|
"onSettingsEditorOpen": {
|
||||||
|
"descriptionOverride": "GitHub Copilot is an AI pair programmer tool that helps you write code faster and smarter."
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"GitHub.vscode-github-actions": {
|
"GitHub.vscode-github-actions": {
|
||||||
"onFileOpen": [
|
"onFileOpen": [
|
||||||
|
@ -539,6 +541,13 @@
|
||||||
"important": true
|
"important": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"Redis.redis-for-vscode": {
|
||||||
|
"onFileOpen": [
|
||||||
|
{
|
||||||
|
"pathGlob": "{**/redis.*,**/redis-server.*,**/redis_*,**/redisinsight.*}"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"keymapExtensionTips": [
|
"keymapExtensionTips": [
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# This script can update the content of ./patch.json to the latest version
|
# This script will update the ./patch.json to match the official release
|
||||||
# Usage: ./update.py /path/to/extracted/produce.json
|
# Usage: ./update.py <version-number>
|
||||||
# Where /path/to/extracted/produce.json is extracted from the latest version of official vscode release
|
# Where <version-number> is the version of the official release
|
||||||
|
|
||||||
import sys
|
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
key_list = [
|
key_list = [
|
||||||
"extensionsGallery",
|
"extensionsGallery",
|
||||||
|
@ -19,19 +22,38 @@ key_list = [
|
||||||
"extensionAllowedBadgeProviders",
|
"extensionAllowedBadgeProviders",
|
||||||
"extensionAllowedBadgeProvidersRegex",
|
"extensionAllowedBadgeProvidersRegex",
|
||||||
"msftInternalDomains",
|
"msftInternalDomains",
|
||||||
"linkProtectionTrustedDomains"
|
"linkProtectionTrustedDomains",
|
||||||
]
|
]
|
||||||
|
|
||||||
product_path = sys.argv[1]
|
|
||||||
patch_path = "patch.json"
|
|
||||||
|
|
||||||
with open(product_path, "r") as product_file:
|
def fetch_product_json(version: str):
|
||||||
product_data = json.load(product_file)
|
"""Download official release and extract it, then copy product.json to project root"""
|
||||||
|
url = f"https://update.code.visualstudio.com/{version}/linux-x64/stable"
|
||||||
|
download_cmd = ["curl", "-fSL", "-o", "code.tgz", url]
|
||||||
|
subprocess.run(download_cmd)
|
||||||
|
extract_cmd = ["tar", "xvf", "code.tgz"]
|
||||||
|
subprocess.run(extract_cmd)
|
||||||
|
shutil.copy(src="./VSCode-linux-x64/resources/app/product.json", dst=".")
|
||||||
|
shutil.rmtree("./VSCode-linux-x64")
|
||||||
|
os.remove("code.tgz")
|
||||||
|
|
||||||
patch_data = {}
|
|
||||||
|
|
||||||
for key in key_list:
|
def update_package():
|
||||||
patch_data[key] = product_data[key]
|
"""Update the package"""
|
||||||
|
with open("./product.json", "r") as product_file:
|
||||||
|
product_data = json.load(product_file)
|
||||||
|
|
||||||
with open(patch_path, "w") as patch_file:
|
patch_data = {}
|
||||||
json.dump(patch_data, patch_file, indent='\t')
|
|
||||||
|
for key in key_list:
|
||||||
|
patch_data[key] = product_data[key]
|
||||||
|
|
||||||
|
with open("./patch.json", "w") as patch_file:
|
||||||
|
json.dump(patch_data, patch_file, indent="\t")
|
||||||
|
|
||||||
|
subprocess.run(["updpkgsums", "./PKGBUILD"])
|
||||||
|
|
||||||
|
|
||||||
|
version = sys.argv[1]
|
||||||
|
fetch_product_json(version)
|
||||||
|
update_package()
|
||||||
|
|
Loading…
Reference in a new issue