Skip to content

Commit

Permalink
Merge pull request #188734 from Homebrew/update-intune-company-portal
Browse files Browse the repository at this point in the history
  • Loading branch information
p-linnane authored Oct 16, 2024
2 parents 212e5a3 + f12e20b commit 5fa790e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Casks/i/intune-company-portal.rb
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
cask "intune-company-portal" do
version "5.2409.1"
sha256 :no_check
sha256 "5fc90f74ffd980c0d696a5698a8df6743743b8882e7ad99b58f61eb050476e6c"

url "https://officecdn.microsoft.com/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/CompanyPortal-Installer.pkg"
url "https://officecdn.microsoft.com/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/CompanyPortal_#{version}-Upgrade.pkg"
name "Company Portal"
desc "App to manage access to corporate apps, data, and resources"
homepage "https://docs.microsoft.com/en-us/mem/intune/user-help/enroll-your-device-in-intune-macos-cp"

livecheck do
url :url
strategy :extract_plist do |items|
items["com.microsoft.CompanyPortalMac"].short_version
url "https://officecdn.microsoft.com/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/0409IMCP01.xml"
regex(/^CompanyPortal[._-]v?(\d+(?:\.+\d+)+)[._-]Upgrade\.pkg$/i)
strategy :xml do |xml, regex|
filename = xml.elements["//key[text()='Payload']"]&.next_element&.text&.strip
match = filename&.match(regex)
next if match.blank?

match[1]
end
end

auto_updates true
depends_on cask: "microsoft-auto-update"
depends_on macos: ">= :mojave"

pkg "CompanyPortal-Installer.pkg",
pkg "CompanyPortal_#{version}-Upgrade.pkg",
choices: [
{
"choiceIdentifier" => "com.microsoft.package.Microsoft_AutoUpdate.app", # Office16_autoupdate_updater.pkg
Expand Down

0 comments on commit 5fa790e

Please sign in to comment.