Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--clean option does something else than documented #930

Open
moiristo opened this issue Sep 12, 2023 · 3 comments
Open

--clean option does something else than documented #930

moiristo opened this issue Sep 12, 2023 · 3 comments

Comments

@moiristo
Copy link

moiristo commented Sep 12, 2023

Description and Context

Summary

The --clean option has been documented as "Will cause upload to delete files in your HubSpot account that are not found locally". However, when I specify a root directory, the cli actually removes the remote directory and then re-uploads the local version. This seems OK, but for us it had the unintended side effect that any configured global content using the Global Content Editor is reset to the defaults as defined in the global partials.

CLI version

5.0.1

Steps to reproduce

  1. Fetch a folder, e.g. hs fetch theme
  2. Reupload using --clean, e.g. hs upload theme theme --clean

Expected behavior

The documentation should at least match what will actually happen.
In our case it would be better if only files in the HS account are deleted when not found locally.

@pieterdt
Copy link

pieterdt commented May 5, 2024

I bumped into this today as well, very frustrating as this means you cannot sync your codebase properly (with CI deployments) without losing content.

Documentation needs to be updated and a solution should be found as well imho.

@albertSorianoAccolade
Copy link

My team has encountered the same issue, our content has been overwritten and the revision history is empty, so there is no way to rollback to a previous version.

@petrklus
Copy link

petrklus commented Dec 2, 2024

Bump on this - this really is not very clear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants