Skip to content

Commit

Permalink
Merge pull request #733 from Shopify/andyw8/minor-ux-tweaks
Browse files Browse the repository at this point in the history
Minor UX tweaks
  • Loading branch information
andyw8 committed Jul 21, 2020
2 parents 4b3cb01 + 0cf157c commit 37f3cce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestUploadForSkipFileWhenChecksumsMatch(t *testing.T) {
client.On("UpdateAsset", shopify.Asset{Key: "assets/app.js", Checksum: "d41d8cd98f00b204e9800998ecf8427e"}).Return(nil)
err := deploy(ctx)
assert.Nil(t, err)
assert.Contains(t, stdOut.String(), "Skipping config/settings_data.json")
assert.Contains(t, stdOut.String(), "Skipped config/settings_data.json")
assert.Contains(t, stdOut.String(), "Updated assets/app.js")
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ func download(ctx *cmdutil.Ctx) error {
} else if ctx.Flags.Verbose {
var checksumOutput = ""
if asset.Checksum != "" {
checksumOutput = "Remote Checksum: " + requestAsset.Checksum + ", Local Checksum: " + localAsset.Checksum
checksumOutput = "Remote: " + requestAsset.Checksum + ", Local: " + localAsset.Checksum
} else {
checksumOutput = "No Checksum, Local Checksum " + localAsset.Checksum
checksumOutput = "Local: " + localAsset.Checksum
}
ctx.Log.Printf("[%s] Successfully wrote %s to disk (%s)", colors.Green(ctx.Env.Name), colors.Blue(asset.Key), checksumOutput)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func perform(ctx *cmdutil.Ctx, path string, op file.Op) {

if ctx.Flags.Verbose {
checksumOutput := "Checksum: " + localAsset.Checksum
ctx.Log.Printf("[%s] Skipping %s (%s)", colors.Green(ctx.Env.Name), colors.Blue(path), checksumOutput)
ctx.Log.Printf("[%s] %s %s (%s)", colors.Green(ctx.Env.Name), colors.BrightBlack("Skipped"), colors.Blue(path), checksumOutput)
}
case file.Remove:
if err := ctx.Client.DeleteAsset(shopify.Asset{Key: path}); err != nil {
Expand Down
2 changes: 2 additions & 0 deletions src/colors/colors.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ var (
ColorStdOut = log.New(colorable.NewColorableStdout(), "", 0)
// ColorStdErr is a wrapped std err that allows colors
ColorStdErr = log.New(colorable.NewColorableStderr(), "", 0)
// BrightBlack is the color Black
BrightBlack = color.New(color.FgBlack).SprintFunc()
)

0 comments on commit 37f3cce

Please sign in to comment.