From 3d66b0ffdceb020880b61c66974fea68c8d13a2b Mon Sep 17 00:00:00 2001 From: Kang Huaishuai Date: Fri, 10 Nov 2023 17:31:01 +0800 Subject: [PATCH] Update lwpm pkg Signed-off-by: Kang Huaishuai --- windows/lnmp-windows-pm-repo/adb/lwpm.json | 12 +++++++----- windows/lnmp-windows-pm-repo/cfssl/lwpm.json | 4 ++-- windows/lnmp-windows-pm-repo/cfssl/lwpm.yaml | 7 ++++--- windows/lnmp-windows-pm-repo/deno/lwpm.json | 4 ++-- windows/lnmp-windows-pm-repo/python/lwpm.json | 8 ++++---- windows/lnmp-windows-pm-repo/python/lwpm.yaml | 8 ++++---- windows/lnmp-windows-pm-repo/wechat/lwpm.json | 2 +- .../wechatDevtool/lwpm.json | 2 +- windows/lnmp-windows-pm.ps1 | 19 +++++++++++++++++++ 9 files changed, 44 insertions(+), 22 deletions(-) diff --git a/windows/lnmp-windows-pm-repo/adb/lwpm.json b/windows/lnmp-windows-pm-repo/adb/lwpm.json index e6f228639..37ac8a40e 100644 --- a/windows/lnmp-windows-pm-repo/adb/lwpm.json +++ b/windows/lnmp-windows-pm-repo/adb/lwpm.json @@ -7,8 +7,8 @@ "bug": "", "github": "", "releases": "https://developer.android.google.cn/studio/releases/platform-tools", - "url": "https://dl.google.com/android/repository/platform-tools-latest-${env:LWPM_OS}.zip", - "url-mirror": "https://dl.google.com/android/repository/platform-tools_r${VERSION}-windows.zip", + "url": "https://dl.google.com/android/repository/platform-tools-latest-${env:lwpm_os}.zip", + "url-mirror": "https://dl.google.com/android/repository/platform-tools_r${VERSION}-${env:lwpm_os}.zip", "pre-url": "", "pre-url-mirror": "", "command": "adb", @@ -16,17 +16,19 @@ "winget-pkgs": "https://hub.nuaa.cf/microsoft/winget-pkgs/tree/master/manifests/g/Google/PlatformTools", "scripts": { "preinstall": [ - "# _cleanup \"$unzipDesc\"" + "_cleanup \"$unzipDesc\"" ], "install": [ "if($IsWindows){_unzip $filename $env:ProgramData}", - "if(!$IsWindows){_unzip $filename /usr/local/platform-tools}" + "if(!$IsWindows){_unzip $filename $unzipDesc ; sudo cp -r $unzipDesc/platform-tools /usr/local/}", + "if(!$IsWindows){sudo ln -s /usr/local/platform-tools/adb /usr/local/bin/adb}" ], "postinstall": "", "preuninstall": "", "uninstall": [ "if($IsWindows){_cleanup $env:ProgramData\\platform-tools}", - "if(!$IsWindows){_cleanup /usr/local/platform-tools}" + "if(!$IsWindows){sudo rm -rf /usr/local/platform-tools}", + "if(!$IsWindows){sudo rm -rf /usr/local/bin/adb}" ], "postuninstall": "", "pruneuninstall": "", diff --git a/windows/lnmp-windows-pm-repo/cfssl/lwpm.json b/windows/lnmp-windows-pm-repo/cfssl/lwpm.json index a5f2a7c81..ffcb6b758 100644 --- a/windows/lnmp-windows-pm-repo/cfssl/lwpm.json +++ b/windows/lnmp-windows-pm-repo/cfssl/lwpm.json @@ -6,8 +6,8 @@ ], "releases": "https://github.com/cloudflare/cfssl/releases", "scripts": { - "install": "$url = \"https://${env:GITHUB_MIRROR}/cloudflare/cfssl/releases/download/v${VERSION}\"\n$pkgs='cfssl','cfssl-bundle','cfssl-certinfo','cfssl-newkey','cfssl-scan','cfssljson','mkbundle','multirootca'\nforeach($pkg in $pkgs){\n printInfo Downloading $pkg ...\n\n if($_isWindows){\n $dist=\"C:\\bin\\${pkg}.exe\"\n }else{\n $dist=\"/usr/local/bin/${pkg}\"\n }\n\n if(Test-Path $dist){\n printTips $pkg exists`, skip\n continue;\n }\n\n if($_isWindows){\n curl -fsSL $url/${pkg}_${VERSION}_${env:lwpm_os}_amd64$(if($_isWindows){echo .exe}) -o $dist\n }else{\n sudo curl -fsSL $url/${pkg}_${VERSION}_${env:lwpm_os}_amd64$(if($_isWindows){echo .exe}) -o $dist\n sudo chmod +x $dist\n }\n\n}\n", + "install": "$url = \"https://github.com/cloudflare/cfssl/releases/download/v${VERSION}\"\n$pkgs='cfssl','cfssl-bundle','cfssl-certinfo','cfssl-newkey','cfssl-scan','cfssljson','mkbundle','multirootca'\nforeach($pkg in $pkgs){\n printInfo Downloading $pkg ...\n\n if($_isWindows){\n $dist=\"C:\\bin\\${pkg}.exe\"\n }else{\n $dist=\"/usr/local/bin/${pkg}\"\n }\n\n if(Test-Path $dist){\n printTips $pkg exists`, skip\n continue;\n }\n\n if($_isWindows){\n curl -fsSL $url/${pkg}_${VERSION}_${env:lwpm_os}_${env:lwpm_architecture}$(if($_isWindows){echo .exe}) -o $dist\n }else{\n printInfo \"Download from $url/${pkg}_${VERSION}_${env:lwpm_os}_${env:lwpm_architecture}$(if($_isWindows){echo .exe})\"\n sudo curl -fsSL $url/${pkg}_${VERSION}_${env:lwpm_os}_${env:lwpm_architecture}$(if($_isWindows){echo .exe}) -o $dist\n sudo chmod +x $dist\n }\n\n}\n", "test": "cfssl version" }, - "version": "1.6.1" + "version": "1.6.4" } diff --git a/windows/lnmp-windows-pm-repo/cfssl/lwpm.yaml b/windows/lnmp-windows-pm-repo/cfssl/lwpm.yaml index 3ba71e8fb..6ac438105 100644 --- a/windows/lnmp-windows-pm-repo/cfssl/lwpm.yaml +++ b/windows/lnmp-windows-pm-repo/cfssl/lwpm.yaml @@ -1,5 +1,5 @@ name: cfssl -version: 1.6.1 +version: 1.6.4 github: cloudflare/cfssl releases: https://github.com/cloudflare/cfssl/releases scripts: @@ -21,9 +21,10 @@ scripts: } if($_isWindows){ - curl -fsSL $url/${pkg}_${VERSION}_${env:lwpm_os}_amd64$(if($_isWindows){echo .exe}) -o $dist + curl -fsSL $url/${pkg}_${VERSION}_${env:lwpm_os}_${env:lwpm_architecture}$(if($_isWindows){echo .exe}) -o $dist }else{ - sudo curl -fsSL $url/${pkg}_${VERSION}_${env:lwpm_os}_amd64$(if($_isWindows){echo .exe}) -o $dist + printInfo "Download from $url/${pkg}_${VERSION}_${env:lwpm_os}_${env:lwpm_architecture}$(if($_isWindows){echo .exe})" + sudo curl -fsSL $url/${pkg}_${VERSION}_${env:lwpm_os}_${env:lwpm_architecture}$(if($_isWindows){echo .exe}) -o $dist sudo chmod +x $dist } diff --git a/windows/lnmp-windows-pm-repo/deno/lwpm.json b/windows/lnmp-windows-pm-repo/deno/lwpm.json index 857df4785..a53f0573d 100644 --- a/windows/lnmp-windows-pm-repo/deno/lwpm.json +++ b/windows/lnmp-windows-pm-repo/deno/lwpm.json @@ -1,8 +1,8 @@ { "name": "deno", "description": "A secure runtime for JavaScript and TypeScript built with V8, Rust, and Tokio", - "version": "1.31.1", - "pre-version": "1.31.1", + "version": "1.38.0", + "pre-version": "1.38.0", "homepage": "https://deno.land/", "bug": "https://github.com/denoland/deno/issues", "github": "denoland/deno", diff --git a/windows/lnmp-windows-pm-repo/python/lwpm.json b/windows/lnmp-windows-pm-repo/python/lwpm.json index dd05aaad3..d69d83166 100644 --- a/windows/lnmp-windows-pm-repo/python/lwpm.json +++ b/windows/lnmp-windows-pm-repo/python/lwpm.json @@ -9,8 +9,8 @@ "${env:ProgramData}\\Python", "${env:ProgramData}\\Python\\Scripts" ], - "pre-url": "https://www.python.org/ftp/python/${VERSION}/python-${VERSION}-amd64.exe", - "pre-url-mirror": "https://repo.huaweicloud.com/python/${VERSION}/python-${VERSION}-amd64.exe", + "pre-url": "https://www.python.org/ftp/python/${VERSION}/python-${VERSION}-${env:lwpm_architecture}.exe", + "pre-url-mirror": "https://repo.huaweicloud.com/python/${VERSION}/python-${VERSION}-${env:lwpm_architecture}.exe", "pre-version": "3.11.1", "releases": "https://www.python.org/downloads/", "scripts": { @@ -21,7 +21,7 @@ "test": "python --version", "version": "($(python --version) -split \" \")[1]" }, - "url": "https://www.python.org/ftp/python/${VERSION}/python-${VERSION}-amd64.exe", - "url-mirror": "https://repo.huaweicloud.com/python/${VERSION}/python-${VERSION}-amd64.exe", + "url": "https://www.python.org/ftp/python/${VERSION}/python-${VERSION}-${env:lwpm_architecture}.exe", + "url-mirror": "https://repo.huaweicloud.com/python/${VERSION}/python-${VERSION}-${env:lwpm_architecture}.exe", "version": "3.11.1" } diff --git a/windows/lnmp-windows-pm-repo/python/lwpm.yaml b/windows/lnmp-windows-pm-repo/python/lwpm.yaml index 958d97261..84fe27703 100644 --- a/windows/lnmp-windows-pm-repo/python/lwpm.yaml +++ b/windows/lnmp-windows-pm-repo/python/lwpm.yaml @@ -6,10 +6,10 @@ homepage: "https://www.python.org/" bug: "" github: "python/cpython" releases: "https://www.python.org/downloads/" -url: "https://www.python.org/ftp/python/${VERSION}/python-${VERSION}-amd64.exe" -url-mirror: "https://repo.huaweicloud.com/python/${VERSION}/python-${VERSION}-amd64.exe" -pre-url: "https://www.python.org/ftp/python/${VERSION}/python-${VERSION}-amd64.exe" -pre-url-mirror: "https://repo.huaweicloud.com/python/${VERSION}/python-${VERSION}-amd64.exe" +url: "https://www.python.org/ftp/python/${VERSION}/python-${VERSION}-${env:lwpm_architecture}.exe" +url-mirror: "https://repo.huaweicloud.com/python/${VERSION}/python-${VERSION}-${env:lwpm_architecture}.exe" +pre-url: "https://www.python.org/ftp/python/${VERSION}/python-${VERSION}-${env:lwpm_architecture}.exe" +pre-url-mirror: "https://repo.huaweicloud.com/python/${VERSION}/python-${VERSION}-${env:lwpm_architecture}.exe" path: - ${env:ProgramData}\Python - ${env:ProgramData}\Python\Scripts diff --git a/windows/lnmp-windows-pm-repo/wechat/lwpm.json b/windows/lnmp-windows-pm-repo/wechat/lwpm.json index d4c9e6211..13d9c0ef5 100644 --- a/windows/lnmp-windows-pm-repo/wechat/lwpm.json +++ b/windows/lnmp-windows-pm-repo/wechat/lwpm.json @@ -16,6 +16,6 @@ "install": "Start-Process -FilePath $filename -wait", "uninstall": "& ${env:ProgramFiles(x86)}\\Tencent\\WeChat\\Uninstall.exe", "version": "echo ${VERSION}", - "test": "& get-command ${env:ProgramFiles(x86)}\\Tencent\\WeChat\\WeChat.exe" + "test": "if($IsWindows){& get-command ${env:ProgramFiles(x86)}\\Tencent\\WeChat\\WeChat.exe}" } } diff --git a/windows/lnmp-windows-pm-repo/wechatDevtool/lwpm.json b/windows/lnmp-windows-pm-repo/wechatDevtool/lwpm.json index 0193b42c7..717241a6c 100644 --- a/windows/lnmp-windows-pm-repo/wechatDevtool/lwpm.json +++ b/windows/lnmp-windows-pm-repo/wechatDevtool/lwpm.json @@ -5,7 +5,7 @@ "pre-version": "1.06.2305042", "homepage": "https://developers.weixin.qq.com/miniprogram/dev/devtools/devtools.html", "bug": "https://developers.weixin.qq.com/community/develop/question", - "github": "https://github.com/wechat-miniprogram", + "github": "wechat-miniprogram", "releases": "https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html", "url": "https://dldir1.qq.com/WechatWebDev/nightly/p-3bd19c2db3a642a0b39af853efaf67f8/0.54.1/wechat_devtools_${VERSION}$(if($IsWindows){echo _win32_x64.exe}else{if(${env:lwpm_architecture} -eq 'amd64'){echo _darwin_x64.dmg}else{echo _darwin_arm64.dmg}})", "command": "'C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat'", diff --git a/windows/lnmp-windows-pm.ps1 b/windows/lnmp-windows-pm.ps1 index d331d11d5..b110e34ad 100755 --- a/windows/lnmp-windows-pm.ps1 +++ b/windows/lnmp-windows-pm.ps1 @@ -27,6 +27,7 @@ list List available softs outdated Shows a list of installed packages that have updates available info Shows information about packages homepage Opens the package's repository URL or homepage in your browser +github Opens the package's repository URL in your browser bug Opens the package's bug report page in your browser releases Opens the package's releases page in your browser help Print help info @@ -644,8 +645,17 @@ function __homepage($soft) { $lwpm = manifest $soft if ($lwpm.homepage) { start-process $lwpm.homepage + + return + } + + if ($lwpm.github) { + start-process "https://github.com/$($lwpm.github)" } +} +function __github($soft) { + $lwpm = manifest $soft if ($lwpm.github) { start-process "https://github.com/$($lwpm.github)" } @@ -1061,6 +1071,15 @@ if ($args[0] -eq 'homepage') { _exit } +if ($args[0] -eq 'github') { + if ($args[1].length -eq 0) { + "Please input soft name" + _exit + } + __github $args[1] + _exit +} + if ($args[0] -eq 'bug') { if ($args[1].length -eq 0) { "Please input soft name"