Skip to content

Commit

Permalink
Merge branch 'main' into manifesttest
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/test.yml
  • Loading branch information
a-mnich committed May 13, 2024
2 parents bafb72a + 64ece46 commit 8b09be6
Show file tree
Hide file tree
Showing 41 changed files with 757 additions and 1,280 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
35 changes: 32 additions & 3 deletions .github/workflows/GithubReleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
update-releasebased:
name: ${{ matrix.id }}
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Test' }}

strategy:
fail-fast: false
Expand All @@ -28,14 +29,42 @@ jobs:
url: "https://github.com/ankitects/anki/releases/download/{VERSION}/anki-{VERSION}-windows-qt6.exe"
- id: "EdgeTX.Companion"
repo: "EdgeTX/edgetx"
url: "https://github.com/EdgeTX/edgetx/releases/download/{VERSION}/edgetx-cpn-win64-{VERSION}.zip"

url: "https://github.com/EdgeTX/edgetx/releases/download/v{VERSION}/edgetx-cpn-win64-v{VERSION}.zip"
- id: "Betaflight.Betaflight-Configurator"
repo: "betaflight/betaflight-configurator"
url: "https://github.com/betaflight/betaflight-configurator/releases/download/{VERSION}/betaflight-configurator_{VERSION}_win64-installer.exe"
- id: "h3poteto.fedistar"
repo: "h3poteto/fedistar"
url: "https://github.com/h3poteto/fedistar/releases/download/v{VERSION}/fedistar_{VERSION}_x64_en-US.msi"
- id: "hoppscotch.Hoppscotch"
repo: "hoppscotch/releases"
url: "https://github.com/hoppscotch/releases/releases/download/v{VERSION}/Hoppscotch_win_x64.msi"
- id: "AdGuard.dnsproxy"
repo: "AdguardTeam/dnsproxy"
url: "https://github.com/AdguardTeam/dnsproxy/releases/download/v{VERSION}/dnsproxy-windows-386-v{VERSION}.zip https://github.com/AdguardTeam/dnsproxy/releases/download/v{VERSION}/dnsproxy-windows-amd64-v{VERSION}.zip https://github.com/AdguardTeam/dnsproxy/releases/download/v{VERSION}/dnsproxy-windows-arm64-v{VERSION}.zip"
- id: "OpenTofu.Tofu"
repo: "opentofu/opentofu"
url: "https://github.com/opentofu/opentofu/releases/download/v{VERSION}/tofu_{VERSION}_windows_386.zip https://github.com/opentofu/opentofu/releases/download/v{VERSION}/tofu_{VERSION}_windows_amd64.zip"
- id: "mitmproxy.mitmproxy"
repo: "mitmproxy/mitmproxy"
url: "https://downloads.mitmproxy.org/{VERSION}/mitmproxy-{VERSION}-windows-x86_64-installer.exe"
- id: "commercialhaskell.stack"
repo: "commercialhaskell/stack"
url: "https://github.com/commercialhaskell/stack/releases/download/v{VERSION}/stack-{VERSION}-windows-x86_64-installer.exe"
- id: "JohnMacFarlane.Pandoc"
repo: "jgm/pandoc"
url: "https://github.com/jgm/pandoc/releases/download/{VERSION}/pandoc-{VERSION}-windows-x86_64.msi"
- id: "RustDesk.RustDesk"
repo: "rustdesk/rustdesk"
url: "https://github.com/rustdesk/rustdesk/releases/download/{VERSION}/rustdesk-{VERSION}-x86-sciter.exe https://github.com/rustdesk/rustdesk/releases/download/{VERSION}/rustdesk-{VERSION}-x86_64.exe"
steps:
- name: Update Packages
uses: michidk/winget-updater@v1
uses: b0t-at/winget-updater@b0t-main
with:
identifier: ${{ matrix.id }}
repo: ${{ matrix.repo }}
url: ${{ matrix.url }}
komac-token: ${{ secrets.WINGET_PAT }}
komac-version: latest
custom-fork-owner: damn-good-b0t
submit: ${{ vars.SUBMIT_PR }}
29 changes: 29 additions & 0 deletions .github/workflows/MassUpdateManifests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Mass Update Manifest
on:
workflow_dispatch:
inputs:
PackageIdentifier:
description: "Package Identifier"
required: true

jobs:
update:
name: Update manifests
runs-on: windows-latest
env:
WINGET_PKGS_FORK_REPO: ${{vars.WINGET_PKGS_FORK_REPO}}
WINGET_PAT: ${{secrets.WINGET_PAT}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
- name: Checkout winget-pkgs fork
uses: actions/checkout@v4
with:
repository: ${{env.WINGET_PKGS_FORK_REPO}}
token: ${{env.WINGET_PAT}}
- name: Trigget Mass Package Update
run: |
pwd
./Scripts/UpdateManifests.ps1 -PackageIdentifier ${{ github.event.inputs.PackageIdentifier }}
9 changes: 6 additions & 3 deletions .github/workflows/PackageCount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
paths:
- .github/workflows/GithubReleases.yml
- .github/workflows/update-via-script.yml
jobs:
update-package-count:
runs-on: ubuntu-latest
Expand All @@ -15,16 +18,16 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: pip install pyyaml
- name: Count packages
id: count
run: |
echo "::set-output name=countgithub::$(python3 Scripts/package_count.py .github/workflows/GithubReleases.yml)"
echo "::set-output name=countscript::$(python3 Scripts/package_count.py .github/workflows/update-via-script.yml)"
echo "countgithub=$(python3 Scripts/package_count.py .github/workflows/GithubReleases.yml)" >> $GITHUB_OUTPUT
echo "countscript=$(python3 Scripts/package_count.py .github/workflows/update-via-script.yml)" >> $GITHUB_OUTPUT
- name: Update README
run: |
countgithub=${{ steps.count.outputs.countgithub }}
Expand Down
37 changes: 30 additions & 7 deletions .github/workflows/update-via-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,60 @@ jobs:
update-scriptbased:
name: ${{ matrix.PackageName }}
runs-on: windows-latest
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Test' }}

strategy:
fail-fast: false
matrix:
include:
- PackageName: "MongoDB.Server"
WebsiteURL: "https://www.mongodb.com/try/download/community"
WebsiteURL: "https://www.mongodb.com/try/download/community"
With: WinGetCreate
- PackageName: "MongoDB.MongoDBCLI"
WebsiteURL: "https://www.mongodb.com/try/download/tools"
With: WinGetCreate
- PackageName: "MongoDB.Shell"
WebsiteURL: "https://www.mongodb.com/try/download/tools"
WebsiteURL: "https://www.mongodb.com/try/download/tools"
With: WinGetCreate
- PackageName: "MongoDB.MongoDBAtlasCLI"
WebsiteURL: "https://www.mongodb.com/try/download/tools"
With: WinGetCreate
- PackageName: "MongoDB.DatabaseTools"
WebsiteURL: "https://www.mongodb.com/try/download/tools"
- PackageName: "MongoDB.Compass"
WebsiteURL: "https://www.mongodb.com/try/download/tools"
With: WinGetCreate
- PackageName: "MongoDB.Compass.Full"
WebsiteURL: "https://www.mongodb.com/try/download/tools"
With: WinGetCreate
- PackageName: "MongoDB.Compass.Isolated"
WebsiteURL: "https://www.mongodb.com/try/download/tools"
With: WinGetCreate
- PackageName: "MongoDB.Compass.Readonly"
WebsiteURL: "https://www.mongodb.com/try/download/tools"
With: WinGetCreate
- PackageName: "Logitech.OptionsPlus"
WebsiteURL: "https://download01.logi.com/web/ftp/pub/techsupport/optionsplus/logioptionsplus_installer.exe"
WebsiteURL: "https://download01.logi.com/web/ftp/pub/techsupport/optionsplus/logioptionsplus_installer.exe"
With: WinGetCreate
- PackageName: "Glarysoft.GlaryUtilities"
WebsiteURL: "https://download.glarysoft.com/gusetup.exe"
With: WinGetCreate
- PackageName: "GitButler.GitButler"
WebsiteURL: "https://app.gitbutler.com/downloads/release/windows/x86_64/msi"
WebsiteURL: "https://app.gitbutler.com/downloads/release/windows/x86_64/msi"
With: WinGetCreate
- PackageName: "FlipperDevicesInc.qFlipper"
WebsiteURL: "https://update.flipperzero.one/qFlipper/directory.json"
With: WinGetCreate
- PackageName: "Loupedeck.Loupedeck"
WebsiteURL: "https://download.loupedeck.com/software/latest-win"
With: WinGetCreate
- PackageName: "StrawberryPerl.StrawberryPerl"
WebsiteURL: "https://github.com/StrawberryPerl/Perl-Dist-Strawberry"
- PackageName: "Crucial.StorageExecutive"
WebsiteURL: "https://www.crucial.com/content/dam/crucial/support/storage-executive-win-64.zip"
With: WinGetCreate
- PackageName: "SmartProjects.IsoBuster"
WebsiteURL: "https://www.isobuster.com/downloads/isobuster/isobuster_install_64bit.exe https://www.isobuster.com/downloads/isobuster/isobuster_install.exe"
- PackageName: "Fork.Fork"
WebsiteURL: "https://fork.dev"

steps:
- name: Checkout
Expand All @@ -57,6 +78,8 @@ jobs:
WINGET_PKGS_FORK_REPO: ${{ vars.WINGET_PKGS_FORK_REPO }}
WebsiteURL: ${{ matrix.WebsiteURL }}
PackageName: ${{ matrix.PackageName }}
run: .\Scripts\Update-${{ matrix.PackageName }}.ps1
With: ${{ matrix.With }}
Submit: ${{ vars.SUBMIT_PR }}
run: .\Scripts\generic.ps1


6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# winget-pgks-updatepipelines
**winget-pkgs** Pull requests by [damn-good-b0t](https://github.com/microsoft/winget-pkgs/pulls/damn-good-b0t)
[**winget-pkgs**](https://github.com/microsoft/winget-pkgs.git) Pull requests by [damn-good-b0t](https://github.com/microsoft/winget-pkgs/pulls/damn-good-b0t)

| Package Version Handling| Count|
|----------------------------|---------------------------------------------------------------|
| Script based | ![Script based Packages](https://img.shields.io/badge/ScriptPackages-14-green) |
| GitHub Release based | ![GitHub based Packages](https://img.shields.io/badge/GithubPackages-4-blue) |
| Script based | ![Script based Packages](https://img.shields.io/badge/ScriptPackages-17-green) |
| GitHub Release based | ![GitHub based Packages](https://img.shields.io/badge/GithubPackages-13-blue) |
7 changes: 7 additions & 0 deletions Scripts/Packages/Update-Crucial.StorageExecutive.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
. .\Scripts\common.ps1

$latestVersionUrl = $WebsiteURL

$versionInfo = Get-ProductVersionFromFile -WebsiteURL $WebsiteURL -VersionInfoProperty "ProductVersion"

return "$latestVersionUrl|x64", $versionInfo
8 changes: 8 additions & 0 deletions Scripts/Packages/Update-FlipperDevicesInc.qFlipper.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
. .\Scripts\common.ps1


$versionDirectory = Invoke-RestMethod -Uri $WebsiteURL
$latestVersionDirectory = ($versionDirectory.channels | Where-Object id -eq "release").versions.version
$latestVersionUrl = (($versionDirectory.channels | Where-Object id -eq "release").versions.files | Where-Object { ($_.target -eq "windows/amd64") -and ($_.type -eq "installer") }).url

return $latestVersionDirectory, $latestVersionUrl
23 changes: 23 additions & 0 deletions Scripts/Packages/Update-Fork.Fork.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
. .\Scripts\common.ps1


# Currently not all versions have .exe installers
#Text response with entries of form "<SHA> Fork-<Version>-<FUll|Delta>.nupkg <SIZE>"
# Invoke-WebRequest -Uri "https://git-fork.com/update/win/RELEASES?id=Fork" -OutFile "RELEASES"
# $releases = Get-Content "RELEASES"
# $versionNumbers = $releases | ForEach-Object {
# if ($_ -match 'Fork-(.*?)-') {
# $Matches[1]
# }
# }
# $versionNumbers = $versionNumbers | Sort-Object -Descending | Select-Object -Unique

# $latestVersion = $versionNumbers[0]
# $latestVersionUrl = "https://cdn.fork.dev/win/Fork-$latestVersion.exe"

$websiteContent = Invoke-WebRequest -Uri $WebsiteURL
$latestVersionUrl = $websiteContent.Links | Where-Object {$_.tagName -eq "A" -and $_.outerHTML.Contains('"downloadBtn2Win"')} | Select-Object -First 1 -ExpandProperty href
# extract version from link
$latestVersion = [regex]::Match($latestVersionUrl, '.*Fork-(.*).exe').Groups[1].Value

return $latestVersion, "$latestVersionUrl"
26 changes: 26 additions & 0 deletions Scripts/Packages/Update-Gitbutler.GitButler.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
. .\Scripts\common.ps1


# Follow redirect of https://app.gitbutler.com/downloads/release/windows/x86_64/msi
$website = $WebsiteURL
$absolutURL=[System.Net.HttpWebRequest]::Create($website).GetResponse().ResponseUri.AbsoluteUri

# regex to check if variable absolutURL is valid URL
$regex = "^(http|https)://([\w-]+.)+[\w-]+(/[\w- ./?%&=])?$"
if ($absolutURL -match $regex) {
$latestVersionUrl = $absolutURL
Write-Host "URL is valid"
}
else {
Write-Host "URL is not valid"
exit 1
}


# get full name of file from link
$fileName = $latestVersionUrl.Split("/")[-1]

# Get Version via Regex. The version is the part betweet "GitButler_" and "_x64"
$latestVersion = $fileName -replace ".*GitButler_(.*)_(x64|x86).*", '$1'

return $latestVersion, $latestVersionUrl
7 changes: 7 additions & 0 deletions Scripts/Packages/Update-Glarysoft.GlaryUtilities.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
. .\Scripts\common.ps1

$latestVersionUrl = $WebsiteURL
# download latest version from loupedeck.com and get version by filename
$versionInfo = Get-ProductVersionFromFile -WebsiteURL $WebsiteURL -VersionInfoProperty "ProductVersionRaw"

return $versionInfo, $latestVersionUrl
7 changes: 7 additions & 0 deletions Scripts/Packages/Update-Logitech.OptionsPlus.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
. .\Scripts\common.ps1

$latestVersionUrl = $WebsiteURL
# download latest version from loupedeck.com and get version by filename
$versionInfo = Get-ProductVersionFromFile -WebsiteURL $WebsiteURL -VersionInfoProperty "ProductVersion"

return $versionInfo, $latestVersionUrl
24 changes: 24 additions & 0 deletions Scripts/Packages/Update-Loupedeck.Loupedeck.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
. .\Scripts\common.ps1

$latestVersionUrl = $WebsiteURL

# download latest version from loupedeck.com and get version by filename
$versionInfo = Get-ProductVersionFromFile -WebsiteURL $WebsiteURL -VersionInfoProperty "ProductVersion"


Write-Host "Found latest version: $versionInfo"
$latestversion = $versionInfo
# extract major and minor version e.g. 5.9 from 5.9.10
$majorMinorVersion = $versionInfo -replace '\.\d+$'
$fullDownloadURL = "https://5145542.fs1.hubspotusercontent-na1.net/hubfs/5145542/Knowledge%20Base/LD%20Software%20Downloads/$majorMinorVersion/LoupedeckInstaller_" + $versionInfo + ".exe"

Write-Host "Full download URL: $fullDownloadURL"

# check if full download URL is valid
$fullDownloadURLResponse = Invoke-WebRequest -Uri $fullDownloadURL -UseBasicParsing -Method Head
if ($fullDownloadURLResponse.StatusCode -ne 200) {
Write-Host "Full download URL is not valid"
exit 1
}

return $latestVersion, $fullDownloadURL
17 changes: 17 additions & 0 deletions Scripts/Packages/Update-MongoDB.Compass.Full.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
. .\Scripts\common.ps1

$PackageFilter = "mongodb-compass"

$Latest = Get-LatestMongoDBVersions -PackageFilter $PackageFilter -WebsiteURL $WebsiteURL

$latestVersion = $Latest.Version
$latestVersionUrl = $Latest.Url

# Bring $latestVersion in correct format x.x.x.x
# Check if $latestVersion is in the x.x.x format
if ($latestVersion -match '^\d+\.\d+\.\d+$') {
# Append .0 to $latestVersion
$latestVersion = "$latestVersion.0"
}

return $latestVersion, $latestVersionUrl
17 changes: 17 additions & 0 deletions Scripts/Packages/Update-MongoDB.Compass.Isolated.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
. .\Scripts\common.ps1

$PackageFilter = "mongodb-compass-isolated"

$Latest = Get-LatestMongoDBVersions -PackageFilter $PackageFilter -WebsiteURL $WebsiteURL

$latestVersion = $Latest.Version
$latestVersionUrl = $Latest.Url

# Bring $latestVersion in correct format x.x.x.x
# Check if $latestVersion is in the x.x.x format
if ($latestVersion -match '^\d+\.\d+\.\d+$') {
# Append .0 to $latestVersion
$latestVersion = "$latestVersion.0"
}

return $latestVersion, $latestVersionUrl
17 changes: 17 additions & 0 deletions Scripts/Packages/Update-MongoDB.Compass.Readonly.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
. .\Scripts\common.ps1

$PackageFilter = "mongodb-compass-readonly"

$Latest = Get-LatestMongoDBVersions -PackageFilter $PackageFilter -WebsiteURL $WebsiteURL

$latestVersion = $Latest.Version
$latestVersionUrl = $Latest.Url

# Bring $latestVersion in correct format x.x.x.x
# Check if $latestVersion is in the x.x.x format
if ($latestVersion -match '^\d+\.\d+\.\d+$') {
# Append .0 to $latestVersion
$latestVersion = "$latestVersion.0"
}

return $latestVersion, $latestVersionUrl
10 changes: 10 additions & 0 deletions Scripts/Packages/Update-MongoDB.DatabaseTools.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
. .\Scripts\common.ps1

$PackageFilter = "mongodb-database-tools"

$Latest = Get-LatestMongoDBVersions -PackageFilter $PackageFilter -WebsiteURL $WebsiteURL

$latestVersion = $Latest.Version
$latestVersionUrl = $Latest.Url

return $latestVersion, $latestVersionUrl
Loading

0 comments on commit 8b09be6

Please sign in to comment.