Skip to content

Commit

Permalink
updated snapshot concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
revathySV committed Dec 5, 2024
1 parent 4951bc4 commit 9cf02dd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 19 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ export const configSchema = {
type: 'integer',
minimum: 1
},
snapshotConcurrency: {
type: 'integer',
minimum: 1
},
retry: {
type: 'boolean',
default: false
Expand Down
11 changes: 7 additions & 4 deletions packages/core/src/percy.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,14 @@ export class Percy {
// replace arrays instead of merging
return Array.isArray(next) && [path, next];
});

// adjust queue concurrency
let { concurrency } = this.config.discovery;

const concurrency = this.config.discovery.concurrency;
const snapshotConcurrency = concurrency;
if (this.config.discovery.snapshotConcurrency) {
snapshotConcurrency = this.config.discovery.snapshotConcurrency;
}
this.#discovery.set({ concurrency });
this.#snapshots.set({ concurrency });
this.#snapshots.set({ snapshotConcurrency });

return this.config;
}
Expand Down
30 changes: 15 additions & 15 deletions scripts/executable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ mv run-macos percy-osx && chmod +x percy-osx
mv run-win.exe percy.exe && chmod +x percy.exe

# Sign & Notrize mac app
echo "$APPLE_DEV_CERT" | base64 -d > AppleDevIDApp.p12
# echo "$APPLE_DEV_CERT" | base64 -d > AppleDevIDApp.p12

security create-keychain -p percy percy.keychain
security import AppleDevIDApp.p12 -t agg -k percy.keychain -P $APPLE_CERT_KEY -A
security list-keychains -s ~/Library/Keychains/percy.keychain
security default-keychain -s ~/Library/Keychains/percy.keychain
security unlock-keychain -p "percy" ~/Library/Keychains/percy.keychain
security set-keychain-settings -t 3600 -l ~/Library/Keychains/percy.keychain
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k percy ~/Library/Keychains/percy.keychain-db
# security create-keychain -p percy percy.keychain
# security import AppleDevIDApp.p12 -t agg -k percy.keychain -P $APPLE_CERT_KEY -A
# security list-keychains -s ~/Library/Keychains/percy.keychain
# security default-keychain -s ~/Library/Keychains/percy.keychain
# security unlock-keychain -p "percy" ~/Library/Keychains/percy.keychain
# security set-keychain-settings -t 3600 -l ~/Library/Keychains/percy.keychain
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k percy ~/Library/Keychains/percy.keychain-db

codesign --force --verbose=4 -s "Developer ID Application: BrowserStack Inc ($APPLE_TEAM_ID)" --options runtime --entitlements scripts/files/entitlement.plist --keychain ~/Library/Keychains/percy.keychain percy-osx
# codesign --force --verbose=4 -s "Developer ID Application: BrowserStack Inc ($APPLE_TEAM_ID)" --options runtime --entitlements scripts/files/entitlement.plist --keychain ~/Library/Keychains/percy.keychain percy-osx

# Create zip file for uploading as assets
zip percy-linux.zip percy
mv percy-osx percy
zip percy-osx.zip percy
# # Create zip file for uploading as assets
# zip percy-linux.zip percy
# mv percy-osx percy
# zip percy-osx.zip percy

xcrun notarytool submit --apple-id "$APPLE_ID_USERNAME" --password $APPLE_ID_KEY --team-id $APPLE_TEAM_ID percy-osx.zip --wait
# xcrun notarytool submit --apple-id "$APPLE_ID_USERNAME" --password $APPLE_ID_KEY --team-id $APPLE_TEAM_ID percy-osx.zip --wait

cleanup
# cleanup

0 comments on commit 9cf02dd

Please sign in to comment.