Skip to content

Commit

Permalink
Ensure storefront.xcconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
markmur committed Dec 13, 2024
1 parent d056f34 commit c8bf4aa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Scripts/ensure_storefront_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -e

if [ ! -f "./samples/MobileBuyIntegration/Storefront.xcconfig" ]; then
echo """
Error: Your project is missing a Storefront.xcconfig file.

Replace the STOREFRONT_DOMAIN and STOREFRONT_ACCESS_TOKEN environment variables in \"samples/MobileBuyIntegration/Storefront.xcconfig.example\" and rename the file to \"Storefront.xcconfig\" to get started.

If you don't have a Shopify app setup, go to https://admin.shopify.com/settings/apps/development to configure an application for your storefront which will give you access to the Storefront API.
"""
exit 1;
fi
8 changes: 7 additions & 1 deletion dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ type: ios

up:
- ruby
- custom:
name: Ensure Storefront.xcconfig file
met?: |
([ -f "./samples/MobileBuyIntegration/Storefront.xcconfig" ] || exit 1)
meet: ./scripts/ensure_storefront_config
- custom:
name: Setup entitlements
met?: ([ -f "./samples/MobileBuyIntegration/MobileBuyIntegration/MobileBuyIntegration.entitlements" ] || exit 1;)
met?: |
([ -f "./samples/MobileBuyIntegration/MobileBuyIntegration/MobileBuyIntegration.entitlements" ] || exit 1;)
meet: ./scripts/setup_entitlements

packages:
Expand Down

0 comments on commit c8bf4aa

Please sign in to comment.