jul 16, 20206:20 AM - editado jul 16, 20206:31 AM
Membro
Setting up local - can you run hs init for sandbox and live plus examples of navigating to folders
Hello
I am in the process of setting up local development
I have successfully installed command line interface
I am at the point of running a hs init command for the first time - can u run the hs init repeatly as I have a sandbox account and live account. Does the associated yaml file therefore hold two entries within it
Plus in terms of hs line command say with hs fetch where u assign a src and destination folderdo have actual examples of what sort paths you need create for example do you need to use
For example
When sandbox is the name I create in the hs init process not the name of the hs account
based on the following syntax
hs fetch --portal=<name> <src> <dest>
Us what is shown below is the correct syntax if i want to copy a specific folder from my sandbox design manager (where custom lays at the root of the design manager structure)
Alternatively in respect to local file how do set up current working directory do u have to navigate to the folder in command prompt then run the hs command or in the example given does this depend on this being set up by the tool your using - in the example given your using Visual Studio IDE and your opening the local folder from within it.
Regarding your first question, best practice is to run
hs init
Once and any subsequent portals be added using
hs auth
That way only one YAML file is being generated. The CLI will then prompt you to name each portal (something like 'sandbox' and 'production' works) and then use the appropriate name for your development and deployment actions.
@SandyG1's answer should help out with the second question around fetch but I will also advise that you look at the docs for the --overwrite flag if you have any local files in the dest folder you specify as part of your fetch command. By default, any files with the same name will not be overwritten.
Setting up local - can you run hs init for sandbox and live plus examples of navigating to folders
Thanks for everybody help
I succesfully connected and downloaded files, hs init part seened to be more clearly defined
I am at the hs auth, typing hs auth gives me following message :-
configure authentication for hubspot account. Supported authentication protocal are oauth2 and personnelkey
Then a series of options.
Not sure what to do after this - so do i manual ammend the .yaml file eg the hubspt example - Add the 2nd account with the different nickname/ the portalID/ the same accessToken and personalAccessKey?
Setting up local - can you run hs init for sandbox and live plus examples of navigating to folders
Created the.yaml file
Slight problem - Nothing hubspot related Command prompt not playing ball with using controlV so check properties of the command prompt window and change to CTRL SHIFT V and able drop the copied password into value required
jul 16, 20206:29 AM - editado jul 16, 20206:31 AM
Colaborador(a) | Parceiro
Setting up local - can you run hs init for sandbox and live plus examples of navigating to folders
Hi there,
for the fetch command, src will be the folder in which you wish to pull down from your design manager this could be just my-theme (whatever the folder is in your design manager) and then the destination could the folder on your local, which could also match.
for example yours could be
hs fetch --portal=<name> custom theme-2020
custom being the folder and all it's contents as shown in design manager's root
theme-2020 being the new folder relative to the directory you're using this command (on your local)
Thats assuming you're using the command in your project root and your project root has a folder called theme-2020