Skip to content

Commit

Permalink
firefox macos download recipe example
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Jul 3, 2024
1 parent 2b557ae commit 6ad7bae
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Mozilla/Firefox-Mac.download.recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# https://download.mozilla.org/?product=firefox-latest-ssl&os=osx&lang=en-US
---
Description: Downloads the latest version of Firefox
# based upon https://github.com/autopkg/moofit-recipes/blob/master/Adobe/RemoteUpdateManager.download.recipe
Identifier: com.github.jgstew.download.Firefox-Mac
Input:
NAME: "Firefox"
OS: osx
filename: Firefox.dmg
MinimumVersion: "2.3"
Process:
- Processor: com.github.jgstew.SharedProcessors/URLDownloaderPython
Arguments:
# Example URLs:
# - https://download.mozilla.org/?product=firefox-latest-ssl&os=osx&lang=en-US
url: https://download.mozilla.org/?product=firefox-latest-ssl&os=%OS%&lang=en-US
COMPUTE_HASHES: True

- Processor: EndOfCheckPhase

- Processor: com.github.jgstew.SharedProcessors/TextSearcher
Arguments:
input_string: "%download_url%"
re_pattern: 'releases/(?P<version>\d+\.\d+\.\d+)/'

# get SourceReleaseDate from HTTP `Last-Modified` header:
- Processor: com.github.jgstew.SharedProcessors/DateTimeFromString
Arguments:
# parse last_modified header info from URLDownloaderPython
datetime_string: "%last_modified%"
datetime_strptime: "%a, %d %b %Y %H:%M:%S %Z"
datetime_strftime: "%Y-%m-%d"
datetime_parsed_name: SourceReleaseDate

0 comments on commit 6ad7bae

Please sign in to comment.