Closed homebysix closed 4 years ago
You're right, this change didn't consider the Windows recipes that use this shared processor. Sorry about that!
I just added 9480a43b9ade95c56e1f349c9cbecd560f33d3fe, which looks to work for both platforms:
% autopkg run -vvcq ../rustymyers-recipes/Microsoft/MSTeams-Win.download.recipe
Processing ../rustymyers-recipes/Microsoft/MSTeams-Win.download.recipe...
WARNING: ../rustymyers-recipes/Microsoft/MSTeams-Win.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
com.github.apettinen.SharedProcessors/MSTeamsURLProvider
{'Input': {'environment': 'production', 'platform': 'windows'}}
MSTeamsURLProvider: MSTeams URL found: https://statics.teams.microsoft.com/production-windows/1.2.00.34161/Teams_windows.exe
MSTeamsURLProvider: MSTeams version found: 1.2.00.34161
{'Output': {'url': 'https://statics.teams.microsoft.com/production-windows/1.2.00.34161/Teams_windows.exe',
'version': '1.2.00.34161'}}
URLDownloader
{'Input': {'curl_opts': ['--no-alpn'],
'url': 'https://statics.teams.microsoft.com/production-windows/1.2.00.34161/Teams_windows.exe'}}
URLDownloader: No value supplied for prefetch_filename, setting default value of: False
URLDownloader: No value supplied for CHECK_FILESIZE_ONLY, setting default value of: False
URLDownloader: Item at URL is unchanged.
URLDownloader: Using existing ~/Library/AutoPkg/Cache/com.github.rustymyers.download.MSTeams-Win/downloads/Teams_windows.exe
{'Output': {'pathname': '~/Library/AutoPkg/Cache/com.github.rustymyers.download.MSTeams-Win/downloads/Teams_windows.exe'}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
Receipt written to ~/Library/AutoPkg/Cache/com.github.rustymyers.download.MSTeams-Win/receipts/MSTeams-Win.download-receipt-20200120-081440.plist
Nothing downloaded, packaged or imported.
% autopkg run -vvcq MSTeams/MSTeams.download.recipe
Processing MSTeams/MSTeams.download.recipe...
WARNING: MSTeams/MSTeams.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
com.github.apettinen.SharedProcessors/MSTeamsURLProvider
{'Input': {}}
MSTeamsURLProvider: MSTeams URL found: https://statics.teams.microsoft.com/production-osx/1.2.00.34155/Teams_osx.pkg
MSTeamsURLProvider: MSTeams version found: 1.2.00.34155
{'Output': {'url': 'https://statics.teams.microsoft.com/production-osx/1.2.00.34155/Teams_osx.pkg',
'version': '1.2.00.34155'}}
URLDownloader
{'Input': {'curl_opts': ['--no-alpn'],
'url': 'https://statics.teams.microsoft.com/production-osx/1.2.00.34155/Teams_osx.pkg'}}
URLDownloader: No value supplied for prefetch_filename, setting default value of: False
URLDownloader: No value supplied for CHECK_FILESIZE_ONLY, setting default value of: False
URLDownloader: Item at URL is unchanged.
URLDownloader: Using existing ~/Library/AutoPkg/Cache/com.github.apettinen.download.MSTeams/downloads/Teams_osx.pkg
{'Output': {'pathname': '~/Library/AutoPkg/Cache/com.github.apettinen.download.MSTeams/downloads/Teams_osx.pkg'}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
Receipt written to ~/Library/AutoPkg/Cache/com.github.apettinen.download.MSTeams/receipts/MSTeams.download-receipt-20200120-081457.plist
Nothing downloaded, packaged or imported.
Cool! Thanks for fixing this, will merge it now! 👍
Thanks again, these are good additions in general!
One question before merging: I checked the code and the version output seems to support only macOS version of Teams, if I understood correctly. However, I know that the recipe at least has been used to download Windows versions in an undisclosed organization. The question is that how would the version output look like in a non-macOS use case? If in those cases the version output is an empty string, and the version information is appended to the filename in the download recipe, that would result in filenames like
Teams-.msi
. Am I correct? While that does not necessarily break anything, as we are operating mostly likely with variable names, it nevertheless has the potential to do so. Then again, I do not think this is that big of an issue when compared to the overall improvement the changes make.Please do correct if I misunderstood something or my thinking is faulty.