diff --git a/.gitignore b/.gitignore index fe94ac8c9..fae1c7d3d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ -# may contain OAuth secrets, do not commit +# ignore the license file +license.xml + +# may contain OAuth secrets, do not commit .sitecore/user.json # NuGet cache for Sitecore CLI diff --git a/README.md b/README.md index 6e1b9964b..a54fd3732 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,34 @@ ## QUICK START -1. In an ADMIN terminal: +1. Copy your license file to the license folder + +2. In an ADMIN terminal: ```ps1 - .\init.ps1 -InitEnv -LicenseXmlPath "C:\path\to\license.xml" -AdminPassword "DesiredAdminPassword" + .\init.ps1 -InitEnv -AdminPassword "DesiredAdminPassword" ``` -2. Restart your terminal and run: +3. Restart your terminal and run: ```ps1 .\up.ps1 ``` -3. Follow the instructions to [deploy to XM Cloud](#deploy-to-xmcloud) +4. Follow the instructions to [deploy to XM Cloud](#deploy-to-xmcloud) + +5. Create Edge token and [query from edge](#query-edge) + +### License File -4. Create Edge token and [query from edge](#query-edge) +If you store your license file in a central location, you can pass a LicenseXmlPath paramter to the init command to use that location. + +```ps1 +.\init.ps1 -InitEnv -LicenseXmlPath "C:\path\to\license.xml" -AdminPassword "DesiredAdminPassword" +``` *** ## About this Solution This solution is designed to help developers learn and get started quickly with XMCLoud + SXA. - - diff --git a/init.ps1 b/init.ps1 index 37e2b03f9..ea845a69f 100644 --- a/init.ps1 +++ b/init.ps1 @@ -4,10 +4,10 @@ Param ( ParameterSetName = "env-init")] [switch]$InitEnv, - [Parameter(Mandatory = $true, + [Parameter(Mandatory = $false, HelpMessage = "The path to a valid Sitecore license.xml file.", ParameterSetName = "env-init")] - [string]$LicenseXmlPath, + [string]$LicenseXmlPath =".\license\license.xml", # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, # and used only for transient local development environments. diff --git a/license/.gitkeep b/license/.gitkeep new file mode 100644 index 000000000..e69de29bb