Repository: Shopify/themekit
Pull request #803 (2020-09-23 02:03:07)

Update docs regarding windows `ignore_files` settings
See #797 for context.

### Warn Checklist
- [ ] This changes the interface and requires a Major/Minor version change.
- [ ] I have :tophat:'d these changes by using the commands I changed by hand.
- [ ] I have added a dependancy to the project.
- [ ] I have considered any potential impact on [node-themekit](https://github.com/Shopify/node-themekit)



Patch:
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 3afeeae..314ae06 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -18,7 +18,7 @@ A clear and concise description of what you expected to happen.
 
 **Environment (please complete the following information):**
  - OS [e.g. iOS]:
-- Themekit version [e.g. v0.7.5]:
+- Themekit version (run theme version to check):
  - Editor [e.g. atom, sublime]:
  - Ignore:
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 76ae880..661411b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -61,34 +61,3 @@ A man in the middle proxy is the easiest way to introspect the requests that the
 - After that command finished, you can quit mitmproxy by pressing q then y
 
 If troubleshooting an issue for a partner, we can ask that they provide the `themekit_dump` log which can then be loaded into mitmproxy for analysis.
-
-# Deploying Theme Kit
-
-- Update ThemeKitVersion in `src/release/release.go` and commit.
-- Make the release tool `go install ./cmd/tkrelease`
-- run `git tag <version> && git push origin --tags && git push`
-- Update the changelog.txt with the date of the version release
-- Release using tool
-  - build all distributions `make all`
-  - release `tkrelease -k="AWS_ACCESS_KEY" -s="AWS_SECRET_KEY" vX.X.X`
-    - If releasing a different version than in `src/release/version.go` you can use `-f` to force, sometimes this is necessary for specific issue tags like `v0.0.0-issue432` when trying to debug a issue.
-    - Using beta/alpha tags on the version number will stop themekit from automatically updating to that version. It would have to be typed in specifically like `theme update --version=v1.0.4-rc1`
-- On GitHub create a new release for the tag and take note of any relevant changes.
-  - Include a brief summary of all the changes
-  - Include links to the Pull Requests that introduced these changes
-- Update the [documentation website](https://shopify.github.io/themekit/)
-  - run `make serve_docs`
-  - update any changes to the API
-  - commit changes
-- (Consider waiting a day before performing the next steps, in case a defect is reported and we need to issue a patch release).
-- Update `themekitversion` in docs config `docs/_config.yml` to update the download links,
-  then run `make md5s` to generate the checksums for the new files. Add these to the `docs/_config.yml`
-  file as well.
-- Update Chocolatey package in the `choco` folder
-    - Update the version in `choco/themekit.nuspec`
-    - Update the version and checksums in `choco/tools/chocolateyinstall.ps1`
-    - Run `choco pack` in a window VM
-    - Log into [https://chocolatey.org/](chocolatey.org) (use the themekit@shopify.com credentials) and submit an update for approval
-- Update `themekit.rb` formula for homebrew on https://github.com/Shopify/homebrew-shopify
-  - run `make sha` to generate the SHA256 for the darwin build
-  - update the link, sha and version in the homebrew formula
diff --git a/RELEASING.md b/RELEASING.md
new file mode 100644
index 0000000..0cdaad9
--- /dev/null
+++ b/RELEASING.md
@@ -0,0 +1,30 @@
+# Releasing Theme Kit
+
+- Update ThemeKitVersion in `src/release/release.go` and commit.
+- Make the release tool `go install ./cmd/tkrelease`
+- run `git tag <version> && git push origin --tags && git push`
+- Update the changelog.txt with the date of the version release
+- Release using tool
+  - build all distributions `make all`
+  - release `tkrelease -k="AWS_ACCESS_KEY" -s="AWS_SECRET_KEY" vX.X.X`
+    - If releasing a different version than in `src/release/version.go` you can use `-f` to force, sometimes this is necessary for specific issue tags like `v0.0.0-issue432` when trying to debug a issue.
+    - Using beta/alpha tags on the version number will stop themekit from automatically updating to that version. It would have to be typed in specifically like `theme update --version=v1.0.4-rc1`
+- On GitHub create a new release for the tag and take note of any relevant changes.
+  - Include a brief summary of all the changes
+  - Include links to the Pull Requests that introduced these changes
+- Update the [documentation website](https://shopify.github.io/themekit/)
+  - run `make serve_docs`
+  - update any changes to the API
+  - commit changes
+- (Consider waiting a day before performing the next steps, in case a defect is reported and we need to issue a patch release).
+- Update `themekitversion` in docs config `docs/_config.yml` to update the download links,
+  then run `make md5s` to generate the checksums for the new files. Add these to the `docs/_config.yml`
+  file as well.
+- Update Chocolatey package in the `choco` folder
+    - Update the version in `choco/themekit.nuspec`
+    - Update the version and checksums in `choco/tools/chocolateyinstall.ps1`
+    - Run `choco pack` in a window VM
+    - Log into [https://chocolatey.org/](chocolatey.org) (use the themekit@shopify.com credentials) and submit an update for approval
+- Update `themekit.rb` formula for homebrew on https://github.com/Shopify/homebrew-shopify
+  - run `make sha` to generate the SHA256 for the darwin build
+  - update the link, sha and version in the homebrew formula
diff --git a/changelog.txt b/changelog.txt
index eaf0f1b..8728707 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,7 @@
+v1.1.2 (Sep 29, 2020)
+=====================
+- Fix hanging uploads (#809)
+
 v1.1.1 (Sep 1, 2020)
 ====================
 - Fix so that `theme new` doesn't require a theme ID. (#767)
diff --git a/choco/themekit.nuspec b/choco/themekit.nuspec
index ffb0e63..cf9449c 100644
--- a/choco/themekit.nuspec
+++ b/choco/themekit.nuspec
@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
   <metadata>
     <id>themekit</id>
-    <version>1.1.1</version>
+    <version>1.1.2</version>
     <packageSourceUrl>https://github.com/Shopify/themekit/blob/master/choco</packageSourceUrl>
     <owners>Shopify</owners>
     <title>Shopify Themekit</title>
diff --git a/choco/tools/chocolateyinstall.ps1 b/choco/tools/chocolateyinstall.ps1
index 78b54df..9febb5b 100644
--- a/choco/tools/chocolateyinstall.ps1
+++ b/choco/tools/chocolateyinstall.ps1
@@ -2,11 +2,11 @@
 $toolsDir       = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
 $packageName    = $env:ChocolateyPackageName
 $file           = "$($toolsDir)\theme.exe"
-$version        = "v1.1.1"
+$version        = "v1.1.2"
 $url            = "https://shopify-themekit.s3.amazonaws.com/$($version)/windows-386/theme.exe"
 $url64          = "https://shopify-themekit.s3.amazonaws.com/$($version)/windows-amd64/theme.exe"
-$checksum       = 'cee0ece1e248ce7e9d4f340045dcdbb3'
-$checksum64     = '3a1fb85c06922a842d6cec841c302e3a'
+$checksum       = 'fc1f491247d2d6e5f3f9974f12e6b896'
+$checksum64     = '6c10c267e799dd0a3bb06c2b6c29f66c'
 $validExitCodes = @(0)
 
 Get-ChocolateyWebFile `
diff --git a/cmd/configure.go b/cmd/configure.go
index 3f560bd..549113c 100644
--- a/cmd/configure.go
+++ b/cmd/configure.go
@@ -12,7 +12,7 @@ var configureCmd = &cobra.Command{
 	Long: `Configure will create a new configuration file to
  access shopify using the theme kit.
 
- For more documentation please see http://shopify.github.io/themekit/commands/#configure
+ For more documentation please see https://shopify.github.io/themekit/commands/#configure
  `,
 	RunE: func(cmd *cobra.Command, args []string) error {
 		return cmdutil.ForDefaultClient(flags, args, createConfig)
diff --git a/cmd/deploy.go b/cmd/deploy.go
index 9836bf0..759bb9c 100644
--- a/cmd/deploy.go
+++ b/cmd/deploy.go
@@ -43,7 +43,7 @@ var deployCmd = &cobra.Command{
  exist on your local machine will be removed from shopify unless the --nodelete
  flag is passed
 
- For more documentation please see http://shopify.github.io/themekit/commands/#deploy
+ For more documentation please see https://shopify.github.io/themekit/commands/#deploy
  `,
 	RunE: func(cmd *cobra.Command, args []string) error {
 		return cmdutil.ForEachClient(flags, args, deploy)
diff --git a/cmd/download.go b/cmd/download.go
index 3bab31c..db2c760 100644
--- a/cmd/download.go
+++ b/cmd/download.go
@@ -25,7 +25,7 @@ var downloadCmd = &cobra.Command{
  If no filenames are provided then download will download every file in the project
  and write them to disk.
 
- For more documentation please see http://shopify.github.io/themekit/commands/#download
+ For more documentation please see https://shopify.github.io/themekit/commands/#download
  `,
 	RunE: func(cmd *cobra.Command, args []string) error {
 		// download should not care about the live theme
diff --git a/cmd/get.go b/cmd/get.go
index 11b1030..6ea5d20 100644
--- a/cmd/get.go
+++ b/cmd/get.go
@@ -25,7 +25,7 @@ var getCmd = &cobra.Command{
  that it accesses. To get a list of all themes that you can access, you can pass in
  a --list flag.
 
- For more documentation please see http://shopify.github.io/themekit/commands/#get
+ For more documentation please see https://shopify.github.io/themekit/commands/#get
  `,
 	RunE: func(cmd *cobra.Command, args []string) error {
 		// This is a hack to get around theme ID validation for the list operation which doesnt need it
diff --git a/cmd/new.go b/cmd/new.go
index 1b59b56..4368ea4 100644
--- a/cmd/new.go
+++ b/cmd/new.go
@@ -21,7 +21,7 @@ var newCmd = &cobra.Command{
 	the same directory it's called from. Use the --dir flag to specify a custom directory where the generated files
 	should be placed.
 
-  For more documentation please see http://shopify.github.io/themekit/commands/#new
+  For more documentation please see https://shopify.github.io/themekit/commands/#new
   `,
 	RunE: func(cmd *cobra.Command, args []string) error {
 		// This is a hack to get around theme ID validation for the list operation which doesn't need it
diff --git a/cmd/publish.go b/cmd/publish.go
index dd86679..960a36d 100644
--- a/cmd/publish.go
+++ b/cmd/publish.go
@@ -13,7 +13,7 @@ var publishCmd = &cobra.Command{
 	Long: `Publish will update the theme to be your current publish theme. Select
 the theme you want to publish using the env flag.
 
- For more documentation please see http://shopify.github.io/themekit/commands/#deploy
+ For more documentation please see https://shopify.github.io/themekit/commands/#deploy
  `,
 	RunE: func(cmd *cobra.Command, args []string) error {
 		return cmdutil.ForSingleClient(flags, args, publish)
diff --git a/cmd/remove.go b/cmd/remove.go
index 2552c03..5560f8d 100644
--- a/cmd/remove.go
+++ b/cmd/remove.go
@@ -18,7 +18,7 @@ var removeCmd = &cobra.Command{
 	Short: "Remove theme file(s) from shopify",
 	Long: `Remove will delete all specified files from shopify servers.
 
- For more documentation please see http://shopify.github.io/themekit/commands/#remove
+ For more documentation please see https://shopify.github.io/themekit/commands/#remove
 	`,
 	RunE: func(cmd *cobra.Command, args []string) error {
 		return cmdutil.ForEachClient(flags, args, func(ctx *cmdutil.Ctx) error {
diff --git a/cmd/theme.go b/cmd/theme.go
index 01539f9..d09a744 100644
--- a/cmd/theme.go
+++ b/cmd/theme.go
@@ -49,7 +49,7 @@ Complete documentation is available at https://shopify.github.io/themekit/`,
 		Short: "Update Theme kit to the newest version.",
 		Long: `Update will check for a new release, then if there is an applicable update it will download it and apply it.
 
- For more documentation please see http://shopify.github.io/themekit/commands/#update
+ For more documentation please see https://shopify.github.io/themekit/commands/#update
  `,
 		RunE: func(cmd *cobra.Command, args []string) (err error) {
 			colors.ColorStdOut.Printf("Updating from %s to %s", colors.Yellow(release.ThemeKitVersion), colors.Yellow(flags.Version))
diff --git a/cmd/watch.go b/cmd/watch.go
index 03945bc..4f3c605 100644
--- a/cmd/watch.go
+++ b/cmd/watch.go
@@ -30,7 +30,7 @@ var watchCmd = &cobra.Command{
 
  run 'theme watch' while you are editing and it will detect create, update and delete events.
 
- For more documentation please see http://shopify.github.io/themekit/commands/#watch
+ For more documentation please see https://shopify.github.io/themekit/commands/#watch
  `,
 	RunE: func(cmd *cobra.Command, args []string) error {
 		return cmdutil.ForEachClient(flags, args, func(ctx *cmdutil.Ctx) error {
diff --git a/docs/_config.yml b/docs/_config.yml
index bb1b95d..9c29d7b 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -7,15 +7,15 @@ url: "https://shopify.github.io"
 sass:
   cache: true
 # remember to update the checksums
-themekitversion: "v1.1.1"
+themekitversion: "v1.1.2"
 # these can be generated with `make md5s`
-darwinamd64sum: be650ea27d25b47eabb6fadc55f22620
-windows386sum: cee0ece1e248ce7e9d4f340045dcdbb3
-windowsamd64sum: 3a1fb85c06922a842d6cec841c302e3a
-linux386sum: a06df36646c6708204d4af2f69eeca27
-linuxamd64sum: 7a4a280d8dc57cbd3a50e44c9058fbbc
-freebsd386sum: 295e07e03afc55af09108e8ee591134f
-freebsdamd64sum: eca3be174bba29e816f9599fdb5f9cb9
+darwinamd64sum: 5335eaa9d5bb4d428075c2f5398cb486
+windows386sum: fc1f491247d2d6e5f3f9974f12e6b896
+windowsamd64sum: 6c10c267e799dd0a3bb06c2b6c29f66c
+linux386sum: 86c3d33fc1111129460f69614dee0ad4
+linuxamd64sum: 7dcf5d31cab6b66f5e23595e99678cc0
+freebsd386sum: df6ee5890e436d5de168ddfa8b77fffc
+freebsdamd64sum: 5167197428c8119076438b121f8bb6ec
 
 # Build settings
 markdown: kramdown
diff --git a/docs/ignores/index.md b/docs/ignores/index.md
index 294062f..2db0268 100644
--- a/docs/ignores/index.md
+++ b/docs/ignores/index.md
@@ -29,6 +29,9 @@ There are a few rules for the specifications of ignore patterns.
 - Any pattern that starts with a **/** and ends with a **/** will be considered a
   regular expression and will match the whole path. An example pattern would be
   `/\.(txt|gif|bat)$/` that would match any file with the `txt`, `gif` or `bat` extentions.
+- On Windows, you'll need to use a backslash (`\`) as the path separator. We
+  acknowledge that this is not ideal if working across different platforms:
+  [#797](https://github.com/Shopify/themekit/issues/797)
 
 ## Ignores in config.yml example
 
diff --git a/docs/index.md b/docs/index.md
index c8ca4cf..6a44606 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -89,7 +89,7 @@ You'll need to set up new Shopify API credentials to connect Theme Kit to your s
 
 1. In the store's Shopify admin, click **Apps**.
 1. Near the bottom of the page, click on **Manage private apps**.
-1. If you see a notice that "Private app development is disabled", then click "Enable private app development".
+1. If you see a notice that "Private app development is disabled", then click "Enable private app development". (**Note:** Only the store owner can enable private app development. Learn more about [enabling private apps](https://help.shopify.com/en/manual/apps/private-apps#enable-private-app-development-from-the-shopify-admin)).
 1. Click **Create new private app**.
 1. In the **App details** section, fill out the app name and your email address.
 1. In the **Admin API** section, click **Show inactive Admin API permissions**.
diff --git a/src/httpify/client.go b/src/httpify/client.go
index cc83685..d2c9ef0 100644
--- a/src/httpify/client.go
+++ b/src/httpify/client.go
@@ -7,7 +7,6 @@ import (
 	"errors"
 	"fmt"
 	"io/ioutil"
-	"net"
 	"net/http"
 	"net/url"
 	"runtime"
@@ -119,20 +118,23 @@ func (client *HTTPClient) doWithRetry(req *http.Request, body interface{}) (*htt
 
 		client.limit.Wait()
 		resp, err := client.client.Do(req)
-		if err == nil && resp.StatusCode >= 100 && resp.StatusCode <= 428 {
-			return resp, nil
-		} else if err, ok := err.(net.Error); ok && err.Timeout() {
-			attempt++
-			if attempt > client.maxRetry {
-				return resp, fmt.Errorf("request timed out after %v retries, there may be an issue with your connection", client.maxRetry)
+		if err == nil {
+			if resp.StatusCode >= 100 && resp.StatusCode <= 428 {
+				return resp, nil
+			} else if resp.StatusCode == http.StatusTooManyRequests {
+				after, _ := strconv.ParseFloat(resp.Header.Get("Retry-After"), 10)
+				client.limit.ResetAfter(time.Duration(after))
+				continue
 			}
-			time.Sleep(time.Duration(attempt) * time.Second)
-		} else if resp.StatusCode == http.StatusTooManyRequests {
-			after, _ := strconv.ParseFloat(resp.Header.Get("Retry-After"), 10)
-			client.limit.ResetAfter(time.Duration(after))
-		} else if err != nil && strings.Contains(err.Error(), "no such host") {
+		} else if strings.Contains(err.Error(), "no such host") {
 			return nil, errConnectionIssue
 		}
+
+		attempt++
+		if attempt > client.maxRetry {
+			return resp, fmt.Errorf("request failed after %v retries with err: %v", client.maxRetry, err)
+		}
+		time.Sleep(time.Duration(attempt) * time.Second)
 	}
 }
 
diff --git a/src/release/release.go b/src/release/release.go
index bc4580e..87359cc 100644
--- a/src/release/release.go
+++ b/src/release/release.go
@@ -30,7 +30,7 @@ var (
 		"windows-amd64": "theme.exe",
 	}
 	// ThemeKitVersion is the version build of the library
-	ThemeKitVersion, _ = version.NewVersion("1.1.1")
+	ThemeKitVersion, _ = version.NewVersion("1.1.2")
 )
 
 const (


Test patch:
diff --git a/src/httpify/client_test.go b/src/httpify/client_test.go
index 6efd09e..032e7a4 100644
--- a/src/httpify/client_test.go
+++ b/src/httpify/client_test.go
@@ -105,7 +105,7 @@ func TestClient_do(t *testing.T) {
 		if request == 0 {
 			request++
 			mut.Unlock()
-			time.Sleep(time.Second)
+			time.Sleep(5 * time.Millisecond)
 		} else {
 			mut.Unlock()
 		}
@@ -113,7 +113,7 @@ func TestClient_do(t *testing.T) {
 
 	client, _ = NewClient(Params{
 		Domain:  server.URL,
-		Timeout: time.Millisecond,
+		Timeout: 5 * time.Millisecond,
 	})
 	client.baseURL.Scheme = "http"
 
@@ -130,7 +130,7 @@ func TestClient_do(t *testing.T) {
 
 	client, _ = NewClient(Params{
 		Domain:  server.URL,
-		Timeout: time.Millisecond,
+		Timeout: 5 * time.Millisecond,
 	})
 	client.maxRetry = 1
 	client.baseURL.Scheme = "http"
@@ -139,7 +139,7 @@ func TestClient_do(t *testing.T) {
 	assert.Nil(t, err)
 
 	_, err = client.do("POST", "/assets.json", body, nil)
-	assert.EqualError(t, err, "request timed out after 1 retries, there may be an issue with your connection")
+	assert.Contains(t, err.Error(), "request failed after 1 retries with err: ", server.URL)
 	server.Close()
 }