Commit Graph

73 Commits

Author SHA1 Message Date
Armin Briegel
1e3a50c07f Merge branch 'app-searching-changes-in-getAppVersion' into dev-v9.0.1 2022-02-18 16:56:22 +01:00
Søren Theilgaard
cba0e8c766 Merge branch 'Logging-level-improvements' of https://github.com/Installomator/Installomator into Logging-level-improvements 2022-02-09 16:24:40 +01:00
Søren Theilgaard
a25c904ba7 Update functions.sh 2022-02-09 16:23:52 +01:00
Armin Briegel
9afdc233f9 replaced a stray 'tmpdir' 2022-02-09 15:49:05 +01:00
Søren Theilgaard
ff8a9c2c3a Few more DEBUG loggings 2022-02-09 14:38:58 +01:00
Søren Theilgaard
bf740d1ffe Update functions.sh 2022-02-09 14:23:32 +01:00
Søren Theilgaard
1da37a13ca Another ls that could return an error 2022-02-09 14:10:01 +01:00
Søren Theilgaard
b30d4da703 Update functions.sh 2022-02-09 14:04:23 +01:00
Søren Theilgaard
c3714d855c Missing spaces
After manually moving Firefox to Utilities I have tested with this:
```
$ sudo /Installomator/utils/assemble.sh firefox DEBUG=0 INSTALL=force
2022-02-09 09:44:04 : INFO  : firefox : setting variable from argument DEBUG=0
2022-02-09 09:44:04 : INFO  : firefox : setting variable from argument INSTALL=force
2022-02-09 09:44:04 : REQ   : firefox : ################## Start Installomator v. 9.1beta, date 2022-02-09
2022-02-09 09:44:04 : INFO  : firefox : ################## Version: 9.1beta
2022-02-09 09:44:04 : INFO  : firefox : ################## Date: 2022-02-09
2022-02-09 09:44:04 : INFO  : firefox : ################## firefox
2022-02-09 09:44:04 : INFO  : firefox : BLOCKING_PROCESS_ACTION=tell_user
2022-02-09 09:44:04 : INFO  : firefox : NOTIFY=success
2022-02-09 09:44:04 : INFO  : firefox : LOGGING=INFO
2022-02-09 09:44:04 : INFO  : firefox : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-02-09 09:44:04 : INFO  : firefox : Label type: dmg
2022-02-09 09:44:04 : INFO  : firefox : targetDir for installation: /Applications/Utilities
2022-02-09 09:44:04 : INFO  : firefox : found app at /Applications/Utilities/Firefox.app, version 97.0, on versionKey CFBundleShortVersionString
2022-02-09 09:44:04 : INFO  : firefox : appversion: 97.0
2022-02-09 09:44:04 : INFO  : firefox : Label is not of type “updateronly”, and it’s set to use force to install or ignoring app store apps, so not using updateTool.
2022-02-09 09:44:04 : INFO  : firefox : Latest version of Firefox is 97.0
2022-02-09 09:44:04 : INFO  : firefox : There is no newer version available.
2022-02-09 09:44:04 : REQ   : firefox : Downloading https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US to Firefox.dmg
2022-02-09 09:44:16 : REQ   : firefox : no more blocking processes, continue with update
2022-02-09 09:44:16 : REQ   : firefox : Installing Firefox
2022-02-09 09:44:16 : INFO  : firefox : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.NMItuUfS/Firefox.dmg
2022-02-09 09:44:24 : INFO  : firefox : Mounted: /Volumes/Firefox
2022-02-09 09:44:24 : INFO  : firefox : Verifying: /Volumes/Firefox/Firefox.app
2022-02-09 09:44:33 : INFO  : firefox : Team ID matching: 43AQ936H96 (expected: 43AQ936H96 )
2022-02-09 09:44:33 : INFO  : firefox : Downloaded version of Firefox is 97.0 on versionKey CFBundleShortVersionString, same as installed.
2022-02-09 09:44:33 : INFO  : firefox : Using force to install anyway.
2022-02-09 09:44:33 : INFO  : firefox : App has LSMinimumSystemVersion: 10.12.0
2022-02-09 09:44:33 : INFO  : firefox : Copy /Volumes/Firefox/Firefox.app to /Applications/Utilities
2022-02-09 09:44:40 : INFO  : firefox : Changing owner to st
2022-02-09 09:44:40 : INFO  : firefox : Finishing...
2022-02-09 09:44:50 : INFO  : firefox : targetDir for installation: /Applications/Utilities
2022-02-09 09:44:50 : INFO  : firefox : found app at /Applications/Utilities/Firefox.app, version 97.0, on versionKey CFBundleShortVersionString
2022-02-09 09:44:50 : INFO  : firefox : Installed Firefox, version 97.0
2022-02-09 09:44:50 : INFO  : firefox : notifying
2022-02-09 09:44:50 : REQ   : firefox : ################## End Installomator, exit code 0
```
2022-02-09 09:46:24 +01:00
Søren Theilgaard
dd83f6bd75 Update functions.sh 2022-02-09 09:41:03 +01:00
Søren Theilgaard
c55cc788bb Update functions.sh 2022-02-09 09:21:46 +01:00
Søren Theilgaard
557d63a4f3 If we exit a 0 we should still get the exit message 2022-02-08 13:48:33 +01:00
Søren Theilgaard
0432eb62d3 Improved logging levels
Also fixes #340
2022-02-08 12:36:16 +01:00
Søren Theilgaard
ae3f711738 Further logging, finding pkg only return files
Important change, when we use `find` to locate pkgs. Now only files will be returned.
2022-02-07 16:32:23 +01:00
Søren Theilgaard
2a1176a947 Different check for file
The ls command to check for this file will throw an error when the file does not exist. Better to simply test for the file (with size greater than zero).
2022-02-07 12:56:13 +01:00
Søren Theilgaard
4bc67f3de3 Minor logging correction 2022-02-04 14:36:44 +01:00
Søren Theilgaard
83c1911248 Ended up with double-log-lines 2022-02-04 09:26:42 +01:00
Søren Theilgaard
ee9861c0f5 Extra space to align log output 2022-02-04 09:02:56 +01:00
Søren Theilgaard
890c26e2e1 Logging correction for app delete 2022-02-02 21:47:59 +01:00
Søren Theilgaard
f1616d0d02 Logging fixes 2022-02-02 21:23:41 +01:00
Søren Theilgaard
0a05b533a5 Logging info and a fix 2022-02-02 19:59:14 +01:00
Søren Theilgaard
d36b42acf4 Isaac logging improvements/fixes
Moved the variable declarations from `functions.sh` to `arguments.sh`. We need the argument parsing before setting the logging level and other variables.
2022-02-02 19:39:48 +01:00
Søren Theilgaard
bbf4b22296 Fix for Apple signed software
Somehow went missing in the Isaac logging.
2022-02-02 15:23:46 +01:00
Søren Theilgaard
790dabaa27 Comment on exit value if only label name is requested 2022-02-02 15:08:39 +01:00
Søren Theilgaard
ded71fdf8d Error in cleanupAndExit fixed
Unmounted drive after we deleted the temporary items. Reversed order.
2022-02-02 15:02:31 +01:00
Søren Theilgaard
952683310a Merge branch 'pr/268' into 2022-02-02_Theile-base 2022-02-02 14:46:47 +01:00
Søren Theilgaard
19137f6d94 Merge branch 'Fixing-if-LSMinimumSystemVersion-doesn't-exist' into 2022-02-02_Theile-base 2022-02-02 14:42:26 +01:00
Søren Theilgaard
5b54eb7674 Merge branch 'Improved-Isaac-logging' into 2022-02-02_Theile-base 2022-02-02 14:38:18 +01:00
Søren Theilgaard
168abdb32e Merge branch 'versionKey-improvements' into 2022-02-02_Theile-base 2022-02-02 14:34:01 +01:00
Søren Theilgaard
f53e20e313 Update functions.sh
If only returning label name, then we exit with 0.
2022-02-02 13:49:00 +01:00
Søren Theilgaard
bc26aa0ca6 Update functions.sh
Had a problem with `dbeaverce` that claimed LSMinimumSystemVersion was used even though it was not, so improved the handling.
2022-01-31 23:41:07 +01:00
Søren Theilgaard
49337a4ae8 versionKey improved
If `versionKey` is used as part of `valuesfromarguments` it will currently be replaced by our standard value `CFBundleShortVersionString` (it was only testet on labels). So added an `if...then` to know if it was already set as part of the arguments.
Also improved logging to show what `versionKey` is.
2022-01-19 14:36:05 +01:00
Søren Theilgaard
0f448404e2 Merge branch 'dev' into fullscreen-check 2022-01-17 09:53:11 +01:00
Søren Theilgaard
e4a5f47272 Label on each log line (again) 2022-01-14 10:14:29 +01:00
Søren Theilgaard
fee9394751 Few more DEBUG loggings 2022-01-14 10:02:00 +01:00
Søren Theilgaard
7f2bdfb1df Local logging improvements
Improved first lines of logs to be required and show `VERSION` and `VERSIONDATE` on separate lines.
Logging sent to Datadog will have `VERSION` on each line.
2022-01-13 21:52:15 +01:00
Søren Theilgaard
82faf74eb3 Update functions.sh 2022-01-13 14:12:51 +01:00
Søren Theilgaard
f96cd178c6 CLIInstaller included
and a few other displaylog lines changed
2022-01-13 09:44:34 +01:00
Søren Theilgaard
99b908f646 Logging 2022-01-12 21:34:16 +01:00
Søren Theilgaard
c0ce59a1ec Update functions.sh 2022-01-12 13:55:40 +01:00
Søren Theilgaard
a36e9fce43 Isaac Logging
Improvements to logging:
- Logging levels as DEBUG 0 INFO 1 WARN 2 ERROR 3 REQ 4
- External logging to Datadog
- A function to shorten duplicate lines in installation logs
- Ability to extract install.log in the time when Installomator was running, if further investigations needs to be done to logs
2022-01-12 13:53:48 +01:00
Søren Theilgaard
18e3024604 Merge branch 'dev' into Theile-labels-9.0 2022-01-09 21:32:59 +01:00
Søren Theilgaard
188689f1fd Merge pull request #353 from Installomator/pkgInDMGExpansionFix
Pkg in dmg expansion fix
2022-01-09 21:29:41 +01:00
Søren Theilgaard
899dbaa6b3 Merge branch 'dev' into LSMinimumSystemVersion-check 2022-01-09 21:24:27 +01:00
Søren Theilgaard
cd1d05b21f Merge branch 'dev' into Return-label-name 2022-01-09 21:23:24 +01:00
Søren Theilgaard
9b47ed2e3f pkgName can be searched for.
In `logitechoptions` we do not know what the app-name is that contains the pkg in the bundle-package, so now we only give the name of the pkg, and then Installomator will find it.
2022-01-09 10:42:45 +01:00
Søren Theilgaard
a1afc4727e Update functions.sh
Now return one `#` when unknown label is given, not a whole bunch of them.

```
Installomator/utils/assemble.sh strangelabel RETURN_LABEL_NAME=1 DEBUG=0 | tail -1
#
```
2022-01-08 15:37:08 +01:00
Søren Theilgaard
75e550acfe notification
Now with notification:
```
Installomator/utils/assemble.sh omnidisksweeper DEBUG=0 INSTALL=force NOTIFY=all
2022-01-07 14:05:25 omnidisksweeper setting variable from argument DEBUG=0
2022-01-07 14:05:25 omnidisksweeper setting variable from argument INSTALL=force
2022-01-07 14:05:25 omnidisksweeper setting variable from argument NOTIFY=all
2022-01-07 14:05:25 omnidisksweeper ################## Start Installomator v. 9.0dev
2022-01-07 14:05:25 omnidisksweeper ################## omnidisksweeper
2022-01-07 14:05:25 omnidisksweeper BLOCKING_PROCESS_ACTION=tell_user
2022-01-07 14:05:25 omnidisksweeper NOTIFY=all
2022-01-07 14:05:25 omnidisksweeper LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-01-07 14:05:26 omnidisksweeper no blocking processes defined, using OmniDiskSweeper as default
2022-01-07 14:05:26 omnidisksweeper Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.11IcaInb
2022-01-07 14:05:26 omnidisksweeper App(s) found: /Applications/OmniDiskSweeper.app
2022-01-07 14:05:26 omnidisksweeper found app at /Applications/OmniDiskSweeper.app, version 1.13
2022-01-07 14:05:26 omnidisksweeper appversion: 1.13
2022-01-07 14:05:26 omnidisksweeper Using force to install, so not using updateTool.
2022-01-07 14:05:26 omnidisksweeper Latest version of OmniDiskSweeper is 1.13
2022-01-07 14:05:26 omnidisksweeper There is no newer version available.
2022-01-07 14:05:26 omnidisksweeper Downloading https://downloads.omnigroup.com/software/MacOSX/10.14/OmniDiskSweeper-1.13.dmg to OmniDiskSweeper.dmg
2022-01-07 14:05:26 omnidisksweeper notifying
2022-01-07 14:05:28 omnidisksweeper no more blocking processes, continue with update
2022-01-07 14:05:28 omnidisksweeper Installing OmniDiskSweeper
2022-01-07 14:05:28 omnidisksweeper notifying
2022-01-07 14:05:28 omnidisksweeper Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.11IcaInb/OmniDiskSweeper.dmg
2022-01-07 14:05:29 omnidisksweeper Mounted: /Volumes/OmniDiskSweeper
2022-01-07 14:05:29 omnidisksweeper Verifying: /Volumes/OmniDiskSweeper/OmniDiskSweeper.app
2022-01-07 14:05:31 omnidisksweeper Team ID matching: 34YW5XSRB7 (expected: 34YW5XSRB7 )
2022-01-07 14:05:31 omnidisksweeper Downloaded version of OmniDiskSweeper is 1.13, same as installed.
2022-01-07 14:05:31 omnidisksweeper Using force to install anyway.
2022-01-07 14:05:31 omnidisksweeper App has LSMinimumSystemVersion: 10.14
2022-01-07 14:05:32 omnidisksweeper App requires higher System Version than installed: 10.13.5
2022-01-07 14:05:32 omnidisksweeper notifying
2022-01-07 14:05:32 omnidisksweeper ERROR: Installed macOS is too old for this app.
2022-01-07 14:05:32 omnidisksweeper Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.11IcaInb
2022-01-07 14:05:32 omnidisksweeper Unmounting /Volumes/OmniDiskSweeper
"disk4" ejected.
2022-01-07 14:05:32 omnidisksweeper App not closed, so no reopen.
2022-01-07 14:05:32 omnidisksweeper ################## End Installomator, exit code 6
```
2022-01-07 14:07:21 +01:00
Søren Theilgaard
6c498dbf31 LSMinimumSystemVersion handling
If an app has `LSMinimumSystemVersion` in the `Info.plist`, then we will check if the installed macOS lives up to this, and exit if not.

First a normal run on Monterey:
```
Installomator/utils/assemble.sh omnidisksweeper DEBUG=0 INSTALL=force
2022-01-07 13:37:43 omnidisksweeper setting variable from argument DEBUG=0
2022-01-07 13:37:43 omnidisksweeper setting variable from argument INSTALL=force
2022-01-07 13:37:43 omnidisksweeper ################## Start Installomator v. 9.0dev
2022-01-07 13:37:43 omnidisksweeper ################## omnidisksweeper
2022-01-07 13:37:44 omnidisksweeper BLOCKING_PROCESS_ACTION=tell_user
2022-01-07 13:37:44 omnidisksweeper NOTIFY=success
2022-01-07 13:37:44 omnidisksweeper LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-01-07 13:37:44 omnidisksweeper no blocking processes defined, using OmniDiskSweeper as default
2022-01-07 13:37:44 omnidisksweeper Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.41qqoUEN
2022-01-07 13:37:44 omnidisksweeper App(s) found: /Applications/OmniDiskSweeper.app
2022-01-07 13:37:44 omnidisksweeper found app at /Applications/OmniDiskSweeper.app, version 1.13
2022-01-07 13:37:44 omnidisksweeper appversion: 1.13
2022-01-07 13:37:44 omnidisksweeper Using force to install, so not using updateTool.
2022-01-07 13:37:44 omnidisksweeper Latest version of OmniDiskSweeper is 1.13
2022-01-07 13:37:44 omnidisksweeper There is no newer version available.
2022-01-07 13:37:44 omnidisksweeper Downloading https://downloads.omnigroup.com/software/MacOSX/10.14/OmniDiskSweeper-1.13.dmg to OmniDiskSweeper.dmg
2022-01-07 13:37:45 omnidisksweeper no more blocking processes, continue with update
2022-01-07 13:37:45 omnidisksweeper Installing OmniDiskSweeper
2022-01-07 13:37:45 omnidisksweeper Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.41qqoUEN/OmniDiskSweeper.dmg
2022-01-07 13:37:46 omnidisksweeper Mounted: /Volumes/OmniDiskSweeper
2022-01-07 13:37:46 omnidisksweeper Verifying: /Volumes/OmniDiskSweeper/OmniDiskSweeper.app
2022-01-07 13:37:49 omnidisksweeper Team ID matching: 34YW5XSRB7 (expected: 34YW5XSRB7 )
2022-01-07 13:37:49 omnidisksweeper App has LSMinimumSystemVersion: 10.14
2022-01-07 13:37:49 omnidisksweeper Downloaded version of OmniDiskSweeper is 1.13, same as installed.
2022-01-07 13:37:49 omnidisksweeper Using force to install anyway.
2022-01-07 13:37:49 omnidisksweeper Removing existing /Applications/OmniDiskSweeper.app
2022-01-07 13:37:49 omnidisksweeper Copy /Volumes/OmniDiskSweeper/OmniDiskSweeper.app to /Applications
2022-01-07 13:37:49 omnidisksweeper Changing owner to st
2022-01-07 13:37:49 omnidisksweeper Finishing...
2022-01-07 13:37:59 omnidisksweeper App(s) found: /Applications/OmniDiskSweeper.app
2022-01-07 13:37:59 omnidisksweeper found app at /Applications/OmniDiskSweeper.app, version 1.13
2022-01-07 13:37:59 omnidisksweeper Installed OmniDiskSweeper, version 1.13
2022-01-07 13:37:59 omnidisksweeper notifying
2022-01-07 13:37:59 omnidisksweeper Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.41qqoUEN
2022-01-07 13:37:59 omnidisksweeper Unmounting /Volumes/OmniDiskSweeper
"disk4" ejected.
2022-01-07 13:38:00 omnidisksweeper App not closed, so no reopen.
2022-01-07 13:38:00 omnidisksweeper ################## End Installomator, exit code 0
```

Trying where I manually change OS version to 10.13:
```
Installomator/utils/assemble.sh omnidisksweeper DEBUG=0 INSTALL=force
2022-01-07 13:38:39 omnidisksweeper setting variable from argument DEBUG=0
2022-01-07 13:38:39 omnidisksweeper setting variable from argument INSTALL=force
2022-01-07 13:38:39 omnidisksweeper ################## Start Installomator v. 9.0dev
2022-01-07 13:38:39 omnidisksweeper ################## omnidisksweeper
2022-01-07 13:38:39 omnidisksweeper BLOCKING_PROCESS_ACTION=tell_user
2022-01-07 13:38:39 omnidisksweeper NOTIFY=success
2022-01-07 13:38:39 omnidisksweeper LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-01-07 13:38:39 omnidisksweeper no blocking processes defined, using OmniDiskSweeper as default
2022-01-07 13:38:39 omnidisksweeper Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.PXjTfPiA
2022-01-07 13:38:39 omnidisksweeper App(s) found: /Applications/OmniDiskSweeper.app
2022-01-07 13:38:39 omnidisksweeper found app at /Applications/OmniDiskSweeper.app, version 1.13
2022-01-07 13:38:40 omnidisksweeper appversion: 1.13
2022-01-07 13:38:40 omnidisksweeper Using force to install, so not using updateTool.
2022-01-07 13:38:40 omnidisksweeper Latest version of OmniDiskSweeper is 1.13
2022-01-07 13:38:40 omnidisksweeper There is no newer version available.
2022-01-07 13:38:40 omnidisksweeper Downloading https://downloads.omnigroup.com/software/MacOSX/10.14/OmniDiskSweeper-1.13.dmg to OmniDiskSweeper.dmg
2022-01-07 13:38:40 omnidisksweeper no more blocking processes, continue with update
2022-01-07 13:38:40 omnidisksweeper Installing OmniDiskSweeper
2022-01-07 13:38:40 omnidisksweeper Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.PXjTfPiA/OmniDiskSweeper.dmg
2022-01-07 13:38:41 omnidisksweeper Mounted: /Volumes/OmniDiskSweeper
2022-01-07 13:38:41 omnidisksweeper Verifying: /Volumes/OmniDiskSweeper/OmniDiskSweeper.app
2022-01-07 13:38:43 omnidisksweeper Team ID matching: 34YW5XSRB7 (expected: 34YW5XSRB7 )
2022-01-07 13:38:43 omnidisksweeper App has LSMinimumSystemVersion: 10.14
2022-01-07 13:38:43 omnidisksweeper App requires higher System Version than installed: 10.13
2022-01-07 13:38:43 omnidisksweeper ERROR: Installed macOS is too old for this app.
2022-01-07 13:38:43 omnidisksweeper Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.PXjTfPiA
2022-01-07 13:38:43 omnidisksweeper Unmounting /Volumes/OmniDiskSweeper
"disk4" ejected.
2022-01-07 13:38:43 omnidisksweeper App not closed, so no reopen.
2022-01-07 13:38:43 omnidisksweeper ################## End Installomator, exit code 6
```
2022-01-07 13:44:04 +01:00
Søren Theilgaard
3b6e27f1fa RETURN_LABEL_NAME implemented
When using DEPNotify I would like Installomator to return a nice name for the label to show as status in DEPNotify, instead of only the label name.
This way we can do that.
And maybe in the fute include a description of the software, if people are seeking inspiration to software by looking at Installomator (that contains a lot of preferred solution for many)
2022-01-07 09:51:27 +01:00