Moving XCreds to GitHub download

```
% GitHub/Installomator-theile/utils/assemble.sh xcreds DEBUG=2
2022-09-01 14:19:53 : INFO  : xcreds : setting variable from argument DEBUG=2
2022-09-01 14:19:53 : REQ   : xcreds : ################## Start Installomator v. 10.0beta1, date 2022-09-01
2022-09-01 14:19:53 : INFO  : xcreds : ################## Version: 10.0beta1
2022-09-01 14:19:53 : INFO  : xcreds : ################## Date: 2022-09-01
2022-09-01 14:19:53 : INFO  : xcreds : ################## xcreds
2022-09-01 14:19:53 : DEBUG : xcreds : DEBUG mode 2 enabled.
2022-09-01 14:19:54 : INFO  : xcreds : BLOCKING_PROCESS_ACTION=tell_user
2022-09-01 14:19:54 : INFO  : xcreds : NOTIFY=success
2022-09-01 14:19:54 : INFO  : xcreds : LOGGING=DEBUG
2022-09-01 14:19:54 : INFO  : xcreds : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-09-01 14:19:54 : INFO  : xcreds : Label type: pkg
2022-09-01 14:19:54 : INFO  : xcreds : archiveName: XCreds.pkg
2022-09-01 14:19:54 : INFO  : xcreds : no blocking processes defined, using XCreds as default
2022-09-01 14:19:54 : DEBUG : xcreds : Changing directory to /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.LJYgKZS3
2022-09-01 14:19:54 : INFO  : xcreds : App(s) found: /Applications/XCreds.app
2022-09-01 14:19:55 : INFO  : xcreds : found app at /Applications/XCreds.app, version 1.0, on versionKey CFBundleShortVersionString
2022-09-01 14:19:55 : INFO  : xcreds : appversion: 1.0
2022-09-01 14:19:55 : INFO  : xcreds : Latest version of XCreds is 20
2022-09-01 14:19:55 : REQ   : xcreds : Downloading https://github.com/twocanoes/xcreds/releases/download/release_v2_0/XCreds_Build-3261_Version-2.0.pkg to XCreds.pkg
2022-09-01 14:19:55 : DEBUG : xcreds : No Dialog connection, just download
2022-09-01 14:19:55 : DEBUG : xcreds : File list: -rw-r--r--  1 st  staff   2,2M  1 Sep 14:19 XCreds.pkg
2022-09-01 14:19:55 : DEBUG : xcreds : File type: XCreds.pkg: xar archive compressed TOC: 5980, SHA-1 checksum
2022-09-01 14:19:55 : DEBUG : xcreds : curl output was:
*   Trying 140.82.121.3:443...
* Connected to github.com (140.82.121.3) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
} [315 bytes data]
* (304) (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* (304) (IN), TLS handshake, Unknown (8):
{ [19 bytes data]
* (304) (IN), TLS handshake, Certificate (11):
{ [2459 bytes data]
* (304) (IN), TLS handshake, CERT verify (15):
{ [80 bytes data]
* (304) (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* (304) (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
*  start date: Mar 15 00:00:00 2022 GMT
*  expire date: Mar 15 23:59:59 2023 GMT
*  subjectAltName: host "github.com" matched cert's "github.com"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS Hybrid ECC SHA384 2020 CA1
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x11e811400)
> GET /twocanoes/xcreds/releases/download/release_v2_0/XCreds_Build-3261_Version-2.0.pkg HTTP/2
> Host: github.com
> user-agent: curl/7.79.1
> accept: */*
>
< HTTP/2 302
< server: GitHub.com
< date: Thu, 01 Sep 2022 12:19:55 GMT
< content-type: text/html; charset=utf-8
< vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With
< permissions-policy: interest-cohort=()
< location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/494661701/0a8cfad5-2aa5-485a-957c-2cbd75f57136?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220901%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220901T121955Z&X-Amz-Expires=300&X-Amz-Signature=1867f1e5e0e3ccdc87aaf258551d3be85c62a9b860e4ae665c01db34babeff6b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=494661701&response-content-disposition=attachment%3B%20filename%3DXCreds_Build-3261_Version-2.0.pkg&response-content-type=application%2Foctet-stream
< cache-control: no-cache
< strict-transport-security: max-age=31536000; includeSubdomains; preload
< x-frame-options: deny
< x-content-type-options: nosniff
< x-xss-protection: 0
< referrer-policy: no-referrer-when-downgrade
< expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
< content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com objects-origin.githubusercontent.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events *.actions.githubusercontent.com wss://*.actions.githubusercontent.com online.visualstudio.com/api/v1/locations github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src render.githubusercontent.com viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: github.githubassets.com identicons.github.com github-cloud.s3.amazonaws.com secured-user-images.githubusercontent.com/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/
< content-length: 0
< x-github-request-id: F408:8530:EED4F3:10A1E04:6310A36B
<
{ [0 bytes data]
* Connection #0 to host github.com left intact
* Issue another request to this URL: 'https://objects.githubusercontent.com/github-production-release-asset-2e65be/494661701/0a8cfad5-2aa5-485a-957c-2cbd75f57136?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220901%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220901T121955Z&X-Amz-Expires=300&X-Amz-Signature=1867f1e5e0e3ccdc87aaf258551d3be85c62a9b860e4ae665c01db34babeff6b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=494661701&response-content-disposition=attachment%3B%20filename%3DXCreds_Build-3261_Version-2.0.pkg&response-content-type=application%2Foctet-stream'
*   Trying 185.199.111.133:443...
* Connected to objects.githubusercontent.com (185.199.111.133) port 443 (#1)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
} [334 bytes data]
* (304) (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* (304) (IN), TLS handshake, Unknown (8):
{ [19 bytes data]
* (304) (IN), TLS handshake, Certificate (11):
{ [3051 bytes data]
* (304) (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* (304) (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* (304) (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.io
*  start date: Mar 18 00:00:00 2022 GMT
*  expire date: Mar 21 23:59:59 2023 GMT
*  subjectAltName: host "objects.githubusercontent.com" matched cert's "*.githubusercontent.com"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x11e811400)
> GET /github-production-release-asset-2e65be/494661701/0a8cfad5-2aa5-485a-957c-2cbd75f57136?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220901%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220901T121955Z&X-Amz-Expires=300&X-Amz-Signature=1867f1e5e0e3ccdc87aaf258551d3be85c62a9b860e4ae665c01db34babeff6b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=494661701&response-content-disposition=attachment%3B%20filename%3DXCreds_Build-3261_Version-2.0.pkg&response-content-type=application%2Foctet-stream HTTP/2
> Host: objects.githubusercontent.com
> user-agent: curl/7.79.1
> accept: */*
>
< HTTP/2 200
< content-type: application/octet-stream
< content-md5: RrLFcfXK8EDq/0K9qLCThA==
< last-modified: Wed, 31 Aug 2022 15:53:35 GMT
< etag: "0x8DA8B68F6C2079A"
< server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
< x-ms-request-id: b7ffb877-b01e-006c-76fc-bdc9f2000000
< x-ms-version: 2020-04-08
< x-ms-creation-time: Wed, 31 Aug 2022 15:53:35 GMT
< x-ms-lease-status: unlocked
< x-ms-lease-state: available
< x-ms-blob-type: BlockBlob
< content-disposition: attachment; filename=XCreds_Build-3261_Version-2.0.pkg
< x-ms-server-encrypted: true
< fastly-restarts: 1
< accept-ranges: bytes
< date: Thu, 01 Sep 2022 12:19:55 GMT
< via: 1.1 varnish
< age: 83
< x-served-by: cache-cph2320020-CPH
< x-cache: HIT
< x-cache-hits: 1
< x-timer: S1662034796.510835,VS0,VE99
< content-length: 2321014
<
{ [16375 bytes data]
* Connection #1 to host objects.githubusercontent.com left intact

2022-09-01 14:19:55 : REQ   : xcreds : no more blocking processes, continue with update
2022-09-01 14:19:55 : REQ   : xcreds : Installing XCreds
2022-09-01 14:19:55 : INFO  : xcreds : Verifying: XCreds.pkg
updateDialog:26: no such file or directory:
2022-09-01 14:19:55 : DEBUG : xcreds : File list: -rw-r--r--  1 st  staff   2,2M  1 Sep 14:19 XCreds.pkg
2022-09-01 14:19:55 : DEBUG : xcreds : File type: XCreds.pkg: xar archive compressed TOC: 5980, SHA-1 checksum
2022-09-01 14:19:55 : DEBUG : xcreds : spctlOut is XCreds.pkg: accepted
2022-09-01 14:19:55 : DEBUG : xcreds : source=Notarized Developer ID
2022-09-01 14:19:55 : DEBUG : xcreds : origin=Developer ID Installer: Twocanoes Software, Inc. (UXP6YEHSPW)
2022-09-01 14:19:55 : INFO  : xcreds : Team ID: UXP6YEHSPW (expected: UXP6YEHSPW )
2022-09-01 14:19:55 : DEBUG : xcreds : Deleting /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.LJYgKZS3
2022-09-01 14:19:55 : DEBUG : xcreds : Debugging enabled, Deleting tmpDir output was:
/var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.LJYgKZS3/XCreds.pkg
2022-09-01 14:19:55 : DEBUG : xcreds : /var/folders/gy/vrjt7sl52t9ghzn1lnttjtg40000gp/T/tmp.LJYgKZS3
2022-09-01 14:19:55 : INFO  : xcreds : App not closed, so no reopen.
2022-09-01 14:19:55 : DEBUG : xcreds : DEBUG mode 2 enabled, exiting
2022-09-01 14:19:55 : REQ   : xcreds : ################## End Installomator, exit code 0
```
This commit is contained in:
Søren Theilgaard
2022-09-01 14:20:58 +02:00
parent 160dd78ec9
commit ec45fcf945

View File

@@ -1,8 +1,11 @@
xcreds)
name="XCreds"
type="pkgInZip"
#type="pkgInZip"
#packageID="com.twocanoes.pkg.secureremoteaccess"
downloadURL=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -ioE "https://.*\.zip" | head -1)
appNewVersion=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -io "Current Version:.*" | sed -E 's/.*XCreds *([0-9.]*)<.*/\1/g')
#downloadURL=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -ioE "https://.*\.zip" | head -1)
#appNewVersion=$(curl -fs "https://twocanoes.com/products/mac/xcreds/" | grep -io "Current Version:.*" | sed -E 's/.*XCreds *([0-9.]*)<.*/\1/g')
type="pkg"
downloadURL="$(downloadURLFromGit twocanoes xcreds)"
appNewVersion="$(versionFromGit twocanoes xcreds)"
expectedTeamID="UXP6YEHSPW"
;;