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>
|
||||
pkgname=code-marketplace
|
||||
pkgver=1.90.0
|
||||
pkgver=1.95.0
|
||||
pkgrel=1
|
||||
pkgdesc='Enable vscode marketplace in Code OSS'
|
||||
arch=('any')
|
||||
|
@ -14,7 +14,7 @@ source=('code-marketplace.hook'
|
|||
'patch.json')
|
||||
md5sums=('ce502275aa945985182b51420fc6037c'
|
||||
'9ed6f3972479ab6d3d053e7c47ead55a'
|
||||
'56531cac5e74070cde3229c0a5e1503b')
|
||||
'63fcab1dcfb25eacc2697cae3d650ff3')
|
||||
|
||||
package() {
|
||||
install -Dm 644 "${srcdir}"/code-marketplace.hook "${pkgdir}"/usr/share/libalpm/hooks/code-marketplace.hook
|
||||
|
|
|
@ -504,10 +504,12 @@
|
|||
"GitHub.copilot": {
|
||||
"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": {
|
||||
"onFileOpen": [
|
||||
|
@ -539,6 +541,13 @@
|
|||
"important": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"Redis.redis-for-vscode": {
|
||||
"onFileOpen": [
|
||||
{
|
||||
"pathGlob": "{**/redis.*,**/redis-server.*,**/redis_*,**/redisinsight.*}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"keymapExtensionTips": [
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# This script can update the content of ./patch.json to the latest version
|
||||
# Usage: ./update.py /path/to/extracted/produce.json
|
||||
# Where /path/to/extracted/produce.json is extracted from the latest version of official vscode release
|
||||
# This script will update the ./patch.json to match the official release
|
||||
# Usage: ./update.py <version-number>
|
||||
# Where <version-number> is the version of the official release
|
||||
|
||||
import sys
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
key_list = [
|
||||
"extensionsGallery",
|
||||
|
@ -19,13 +22,25 @@ key_list = [
|
|||
"extensionAllowedBadgeProviders",
|
||||
"extensionAllowedBadgeProvidersRegex",
|
||||
"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):
|
||||
"""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")
|
||||
|
||||
|
||||
def update_package():
|
||||
"""Update the package"""
|
||||
with open("./product.json", "r") as product_file:
|
||||
product_data = json.load(product_file)
|
||||
|
||||
patch_data = {}
|
||||
|
@ -33,5 +48,12 @@ patch_data = {}
|
|||
for key in key_list:
|
||||
patch_data[key] = product_data[key]
|
||||
|
||||
with open(patch_path, "w") as patch_file:
|
||||
json.dump(patch_data, patch_file, indent='\t')
|
||||
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