Skip to content

Commit

Permalink
^ Packages update
Browse files Browse the repository at this point in the history
^ FFmpeg Shared update
^ KDE Connect update
* minor ffmpeg fixes
^ update .appveyor.yml
  • Loading branch information
AndreAugustoDev committed Feb 24, 2021
1 parent e8a0f22 commit 3c3e523
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 104 deletions.
174 changes: 88 additions & 86 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,111 +1,113 @@
# AU template: https://github.com/majkinetor/au-packages-template

version: "{build}"
version: '{build}'
max_jobs: 1
# History plugin requires complete log
#clone_depth: 5
branches:
only:
- main
only:
- main
#build:
# verbosity: minimal

environment:
# Set au version to use or omit to use the latest. Specify branch name to use development version from Github
au_version:
au_push: true
# Force test: use 1 to test all, or N to split testing into N groups
au_test_groups: 1

# Github token to commit pushed packages to repository
github_user_repo: AndreAugustoAAQ/chocolatey-packages
github_api_key:
secure: bQZ5ALwy3ddiShuYLHuQI6JgdGeiP0fTVgHEpJT+3Hlk1yQ2oc1YCh6o9TnIlPrw #https://ci.appveyor.com/tools/encrypt

# Mail credentials - for error notifications
mail_user:
secure: YOUR_EMAIL_ACCOUNT_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
mail_pass:
secure: YOUR_EMAIL_PASSWORD_HERE_ENCRYPTED_STRING #https://ci.appveyor.com/tools/encrypt
mail_server: smtp.gmail.com
mail_port: 587
mail_enablessl: true

# ID of the gist used to save run results - create a gist under the github_user (secret or not) and grab the id - https://gist.github.com/name/id
# Optional, leave empty to create anonymous gist
gist_id: 504f8c83b21394b7dbf71b9da54e191c

# Force test: gist id for test results
gist_id_test:

# Chocolatey API key - to push updated packages
api_key:
secure: q3lIUEAwjbbTYbRneCUrVjMNZvGas4iSEMPYsnMd7OwwrKzRKMH9zbqS6k7F2oOf # https://ci.appveyor.com/tools/encrypt
# Set au version to use or omit to use the latest. Specify branch name to use development version from Github
au_version: master
au_push: true
# Force test: use 1 to test all, or N to split testing into N groups
au_test_groups: 1

# Github token to commit pushed packages to repository
github_user_repo: AndreAugustoAAQ/chocolatey-packages
github_api_key:
secure: bQZ5ALwy3ddiShuYLHuQI6JgdGeiP0fTVgHEpJT+3Hlk1yQ2oc1YCh6o9TnIlPrw

github_username: AndreAugustoAAQ
github_password:
secure: RiyzqOCfkpMzFG3hobSCHw==

# Mail credentials - for error notifications
mail_user:
mail_pass:
secure:
mail_server: smtp.gmail.com
mail_port: 587
mail_enablessl: true

# ID of the gist used to save run results - create a gist under the github_user (secret or not) and grab the id - https://gist.github.com/name/id
# Optional, leave empty to create anonymous gist
gist_id: 504f8c83b21394b7dbf71b9da54e191c

# Force test: gist id for test results
gist_id_test:

# Chocolatey API key - to push updated packages
api_key:
secure: q3lIUEAwjbbTYbRneCUrVjMNZvGas4iSEMPYsnMd7OwwrKzRKMH9zbqS6k7F2oOf

init:
- git config --global user.email "[email protected]"
- git config --global user.name "André Augusto"
- git config --global core.safecrlf false

install:
- ps: "Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version"
- ps: $PSVersionTable
- git --version
- choco --version
- ps: |
git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au
. "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
- ps: |
"Build info"
' {0,-20} {1}' -f 'SCHEDULED BUILD:', ($Env:APPVEYOR_SCHEDULED_BUILD -eq 'true')
' {0,-20} {1}' -f 'FORCED BUILD:' , ($Env:APPVEYOR_FORCED_BUILD -eq 'true')
' {0,-20} {1}' -f 'RE BUILD:' , ($Env:APPVEYOR_RE_BUILD -eq 'true')
# Uncomment the below line if you are using any of the functions from chocolatey-core.extension - https://chocolatey.org/packages/chocolatey-core.extension. Ensure you also have it listed in your package's dependencies
# - cinst chocolatey-core.extension
- ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
- ps: $PSVersionTable
- git --version
- choco --version
- ps: |
git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au
. "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
- ps: |
"Build info"
' {0,-20} {1}' -f 'SCHEDULED BUILD:', ($Env:APPVEYOR_SCHEDULED_BUILD -eq 'true')
' {0,-20} {1}' -f 'FORCED BUILD:' , ($Env:APPVEYOR_FORCED_BUILD -eq 'true')
' {0,-20} {1}' -f 'RE BUILD:' , ($Env:APPVEYOR_RE_BUILD -eq 'true')
- cinst chocolatey-core.extension #required for several packages

build_script:
- ps: |
$ErrorActionPreference = 'Continue'
if ($Env:APPVEYOR_PROJECT_NAME -like '*test*') { ./test_all.ps1 "random $Env:au_test_groups"; return }
if ( ($Env:APPVEYOR_SCHEDULED_BUILD -ne 'true') -and ($Env:APPVEYOR_FORCED_BUILD -ne 'true') ) {
switch -regex ($Env:APPVEYOR_REPO_COMMIT_MESSAGE)
{
'\[AU (.+?)\]' { $forced = $Matches[1] }
'\[PUSH (.+?)\]' {
$packages = $Matches[1] -split ' '
Write-Host "PUSHING PACKAGES: $packages"
foreach ($package in $packages) {
Write-Host ("{0}`n{1}`n" -f ('-'*60), "PACKAGE: $package")
$package_dir = ls -recurse | ? { $_.Name -eq "$package.nuspec"} | select -First 1 | % Directory
if (!$package_dir) { Write-Warning "Can't find package '$package'"; continue }
pushd $package_dir
if (Test-Path update.ps1 -ea 0) { ./update.ps1 }
choco pack; Push-Package;
popd
}
return
}
}
}
./update_all.ps1 -ForcedPackages $forced
7z a au_temp.zip $Env:TEMP\chocolatey\au\*
- ps: |
$ErrorActionPreference = 'Continue'
if ($Env:APPVEYOR_PROJECT_NAME -like '*test*') { ./test_all.ps1 "random $Env:au_test_groups"; return }
if ( ($Env:APPVEYOR_SCHEDULED_BUILD -ne 'true') -and ($Env:APPVEYOR_FORCED_BUILD -ne 'true') ) {
switch -regex ($Env:APPVEYOR_REPO_COMMIT_MESSAGE)
{
'\[AU (.+?)\]' { $forced = $Matches[1] }
'\[PUSH (.+?)\]' {
$packages = $Matches[1] -split ' '
Write-Host "PUSHING PACKAGES: $packages"
foreach ($package in $packages) {
Write-Host ("{0}`n{1}`n" -f ('-'*60), "PACKAGE: $package")
$package_dir = ls -recurse | ? { $_.Name -eq "$package.nuspec"} | select -First 1 | % Directory
if (!$package_dir) { Write-Warning "Can't find package '$package'"; continue }
pushd $package_dir
if (Test-Path update.ps1 -ea 0) { ./update.ps1 }
choco pack; Push-Package;
popd
}
return
}
}
}
./update_all.ps1 -ForcedPackages $forced
7z a au_temp.zip $Env:TEMP\chocolatey\au\*
artifacts:
- path: update_info.xml
- path: Update-AUPackages.md
- path: au_temp.zip
- path: update_info.xml
- path: Update-AUPackages.md
- path: au_temp.zip

notifications:
- provider: Email
to: $(mail_user)
on_build_success: false
on_build_failure: true
on_build_status_changed: true
- provider: Email
to: $(mail_user)
on_build_success: false
on_build_failure: true
on_build_status_changed: true

#on_finish:
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
15 changes: 7 additions & 8 deletions ffmpeg-shared/Update.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import-module au
Import-Module au

$releases = 'https://www.gyan.dev/ffmpeg/builds'

Expand All @@ -10,27 +10,26 @@ function global:au_GetLatest {
$version = $rv[0] + '.' + ($rv[1,2,3] -join '')
$dlversion = $rv -join '-'
@{
URL64 = "https://github.com/GyanD/codexffmpeg/releases/download/$dlversion/ffmpeg-$dlversion-full_build-shared.7z"
URL64 = "https://github.com/GyanD/codexffmpeg/releases/download/${dlversion}/ffmpeg-${dlversion}-full_build-shared.7z"
Version = $version
ChecksumType64 = 'sha256'
DownloadVersion = $dlversion
}
}

function global:au_BeforeUpdate { rm tools\*.msi, tools\*.exe -ea 0; Get-RemoteFiles -Purge -NoSuffix }

function global:au_SearchReplace {
@{
".\tools\chocolateyInstall.ps1" = @{
"(^[$]version\s*=\s*)('.*')" = "`$1'$($Latest.DownloadVersion)'"
"(^[$]url64\s*=\s*)('.*')" = "`$1'$($Latest.URL64)'"
"(?i)(^\s*checksum64\s*=\s*)('.*')" = "`$1'$($Latest.Checksum64)'"
}
}
}
}
}

try {
update -ChecksumFor 64
} catch {
$ignore = 'Not Found'
if ($_ -match $ignore) { Write-Host $ignore; 'ignore' } else { throw $_ }
}
if ($_ -match $ignore) { Write-Host $ignore; 'ignore' } else { throw $_ }
}
2 changes: 1 addition & 1 deletion ffmpeg-shared/ffmpeg-shared.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>ffmpeg-shared</id>
<version>4.3.2.20210202</version>
<version>4.3.2.20210220</version>
<title>FFmpeg</title>
<owners>André Augusto</owners>
<authors>FFmpeg Contributors</authors>
Expand Down
8 changes: 4 additions & 4 deletions ffmpeg-shared/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$version = '4.3.2-2021-02-02'
$dir = "ffmpeg-$version-full_build-shared"
$url64 = "https://github.com/GyanD/codexffmpeg/releases/download/$version/ffmpeg-$version-full_build-shared.7z"
$version = '4.3.2-2021-02-20'
$dir = "ffmpeg-${version}-full_build-shared"
$url64 = 'https://github.com/GyanD/codexffmpeg/releases/download/4.3.2-2021-02-20/ffmpeg-4.3.2-2021-02-20-full_build-shared.7z'

$packageArgs = @{
packageName = $env:ChocolateyPackageName
unzipLocation = "$env:PROGRAMFILES"
url64bit = $url64
softwareName = 'ffmpeg*'
checksum64 = 'F7622EB4E21BE5413CBC67B3EA0CB90369D6A4DF0F64CD2C98378787E55216B3'
checksum64 = '149eeb4ddda840d3c072c1083cee3552fb19d6e086bedd7030c2eea6dd12950a'
checksumType64 = 'sha256'
SpecificFolder = "$dir"
}
Expand Down
9 changes: 7 additions & 2 deletions kdeconnect-kde/Update.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import-module au
Import-Module au

$releases = 'https://github.com/KDE/kdeconnect-kde/releases'
$artifacts64 = 'https://binary-factory.kde.org/job/kdeconnect-kde_Release_win64/lastSuccessfulBuild/artifact/'
Expand Down Expand Up @@ -26,4 +26,9 @@ function global:au_GetLatest {
}
}

update -ChecksumFor 64
try {
update -ChecksumFor 64
} catch {
$ignore = 'Not Found'
if ($_ -match $ignore) { Write-Host $ignore; 'ignore' } else { throw $_ }
}
2 changes: 1 addition & 1 deletion kdeconnect-kde/kdeconnect-kde.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>kdeconnect-kde</id>
<version>1.4.490</version>
<version>1.4.507</version>
<packageSourceUrl>https://github.com/AndreAugustoAAQ/chocolatey-packages/tree/main/kdeconnect-kde</packageSourceUrl>
<owners>André Augusto</owners>
<title>KDE Connect</title>
Expand Down
4 changes: 2 additions & 2 deletions kdeconnect-kde/tools/ChocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url64 = 'https://binary-factory.kde.org/job/kdeconnect-kde_Release_win64/503/artifact/kdeconnect-kde-1.4-503-windows-msvc2019_64-cl.exe'
$url64 = 'https://binary-factory.kde.org/job/kdeconnect-kde_Release_win64/507/artifact/kdeconnect-kde-1.4-507-windows-msvc2019_64-cl.exe'

$packageArgs = @{
packageName = $env:ChocolateyPackageName
fileType = 'exe'
url = $url64
softwareName = 'kdeconnect*'
checksum64 = ''
checksum64 = '8f68566ed7219ba5f2a69087f2d1e0cf386f93e3d39992c9aa8aa6d67e071d4b'
checksumType64= 'sha256'
silentArgs = '/S'
}
Expand Down

0 comments on commit 3c3e523

Please sign in to comment.