gist.md.ps1 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Update-AUPackages
  2. $(
  3. $au = gmo au -ListAvailable | % Version | select -First 1 | % { "$_"}
  4. $pno = $Info.result.all.Length
  5. $GitHubUserRepo = $env:github_user_repo
  6. )
  7. [![](https://ci.appveyor.com/api/projects/status/9ipva7kgjigug2rn?svg=true)](https://ci.appveyor.com/project/$GitHubUserRepo/build/$Env:APPVEYOR_BUILD_NUMBER)
  8. [![$pno](https://img.shields.io/badge/AU%20packages-$($pno)-red.svg)](#ok)
  9. [![$au](https://img.shields.io/badge/AU-$($au)-blue.svg)](https://www.powershellgallery.com/packages/AU)
  10. _This file is automatically generated by the [update_all.ps1](https://github.com/$GitHubUserRepo/blob/master/au/update_all.ps1) script using the [AU module](https://github.com/majkinetor/au) ( [view source](https://github.com/$GitHubUserRepo/blob/master/au/gist.md.ps1) )._
  11. |||
  12. |--- | --- |
  13. **Time (UTC)** | $($Info.startTime.ToUniversalTime().ToString('yyyy-MM-dd HH:mm'))
  14. **Git repository** | https://github.com/$GitHubUserRepo
  15. $(
  16. $OFS="`r`n"
  17. $icon_ok = 'https://cdn0.iconfinder.com/data/icons/shift-free/32/Complete_Symbol-128.png'
  18. $icon_er = 'https://cdn0.iconfinder.com/data/icons/shift-free/32/Error-128.png'
  19. if ($Info.error_count.total) {
  20. "<img src='$icon_er' width='48'> **LAST RUN HAD $($Info.error_count.total) [ERRORS](#errors) !!!**" }
  21. else {
  22. "<img src='$icon_ok' width='48'> Last run was OK"
  23. }
  24. md_code $Info.stats
  25. if ($Info.pushed) {
  26. md_title Pushed
  27. md_table $Info.result.pushed -Columns 'Name', 'Updated', 'Pushed', 'RemoteVersion', 'NuspecVersion'
  28. }
  29. if ($Info.error_count.total) {
  30. md_title Errors
  31. md_table $Info.result.errors -Columns 'Name', 'NuspecVersion', 'Error'
  32. $Info.result.errors | % {
  33. md_title $_.Name -Level 3
  34. md_code "$($_.Error)"
  35. }
  36. }
  37. if ($Info.result.ok) {
  38. md_title OK
  39. md_table $Info.result.ok -Columns 'Name', 'Updated', 'Pushed', 'RemoteVersion', 'NuspecVersion'
  40. $Info.result.ok | % {
  41. md_title $_.PackageName -Level 3
  42. md_code $_.Result
  43. }
  44. }
  45. )