<commit_before>﻿import-module au

$releases = 'https://github.com/Gnucash/gnucash/releases/latest'

function global:au_SearchReplace {
  @{
    ".\tools\chocolateyInstall.ps1" = @{
      "(?i)(^\s*url\s*=\s*)('.*')"            = "`$1'$($Latest.URL32)'"
      "(?i)(^\s*checksum\s*=\s*)('.*')"       = "`$1'$($Latest.Checksum32)'"
      "(?i)(^\s*checksumType\s*=\s*)('.*')"   = "`$1'$($Latest.ChecksumType32)'"
    }
  }
}

function global:au_GetLatest {
  $download_page = Invoke-WebRequest -UseBasicParsing -Uri $releases

  $re    = '^/.+\.exe$'
  $url   = $download_page.links | ? href -match $re | select -first 1 -expand href

  $version  = $url -split '[-]' | select -Last 1 -Skip

  @{
    URL32 = 'https://github.com' + $url
    Version = $version
  }
}

update -ChecksumFor 32<commit_msg>(gnucash) Fixed update script<commit_after>﻿import-module au

$releases = 'https://github.com/Gnucash/gnucash/releases/latest'

function global:au_SearchReplace {
  @{
    ".\tools\chocolateyInstall.ps1" = @{
      "(?i)(^\s*url\s*=\s*)('.*')"            = "`$1'$($Latest.URL32)'"
      "(?i)(^\s*checksum\s*=\s*)('.*')"       = "`$1'$($Latest.Checksum32)'"
      "(?i)(^\s*checksumType\s*=\s*)('.*')"   = "`$1'$($Latest.ChecksumType32)'"
    }
  }
}

function global:au_GetLatest {
  $download_page = Invoke-WebRequest -UseBasicParsing -Uri $releases

  $re    = '^/.+\.exe$'
  $url   = $download_page.links | ? href -match $re | select -first 1 -expand href

  $version  = $url -split '[-]' | select -Last 1 -Skip 1

  @{
    URL32 = 'https://github.com' + $url
    Version = $version
  }
}

update -ChecksumFor 32
{'fraction_non_alphanumeric': 0.23667905824039653, 'fraction_numerical': 0.020446096654275093, 'mean_word_length': 2.968058968058968, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2984788', 'n_tokens_mistral': 686, 'n_tokens_neox': 641, 'n_words': 97}