Deploy to relative path

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
claussen
Posts: 19
Last visit: Mon Jan 29, 2024 10:40 am

Deploy to relative path

Post by claussen »

Product, version and build: PSS 5.6.156
32 or 64 bit version of product: 64
Operating system: Win 10 Ent 1809
32 or 64 bit OS: 64

Using version control such as Git presents some complexities with psproj.psbuild files as the deployment settings are saved as absolute paths. Is it possible to use a relative path to the project? If I have the following structure:

Code: Select all

Root
  MyModule.psd1
  MyModule.psm1
  MyModule.psproj
  MyModule.psproj.psbuild
  MyModule\
    MyModule.psd1
    MyModule.psm1
Can I make PSS deploy to ".\MyModule" (which would be Root\MyModule)? Otherwise, when someone does any commits or checkouts which include a change to the deployment path, they will likely have to re-configure it for wherever they have their working directory. For example, if I clone/checkout the repository to "D:\projects\MyModule" and set the deployment folder to "D:\projects\MyModule\MyModule"... then commit that MyModule.psproj.psbuild file...

Now developer B comes along and clones/checkout to "C:\some\other\directory\MyModule", the deployment folder is still "D:\projects\MyModule\MyModule" which may not exist and will throw an error.

Or perhaps I am missing something which might solve this? Obviously the "easy" solution is probably to either ignore this file, or force devs to change it every time... Just hoping there was a better option. I'm open to ideas :-)
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Deploy to relative path

Post by davidc »

Can you zip and upload your psbuild file to get a better idea as to what is happening?

https://www.sapien.com/support/upload

Yes, you should be able to change it to a relative path. The base path will always be relative to the project folder / psbuild file.

At this time there is no mechanism to user specific deployment paths, but you can submit a feature request here:

https://www.sapien.com/requests
David
SAPIEN Technologies, Inc.
User avatar
claussen
Posts: 19
Last visit: Mon Jan 29, 2024 10:40 am

Re: Deploy to relative path

Post by claussen »

davidc wrote: Wed Jan 02, 2019 9:57 am Can you zip and upload your psbuild file to get a better idea as to what is happening?

https://www.sapien.com/support/upload

Yes, you should be able to change it to a relative path. The base path will always be relative to the project folder / psbuild file.

At this time there is no mechanism to user specific deployment paths, but you can submit a feature request here:

https://www.sapien.com/requests
I uploaded as requested. I even deleted the psbuild file while the project was closed...reopened the project, and re-selected the deployment path. It made it an absolute path again on line 3

Code: Select all

[Deploy]
MainFile=(Source Script)
Destination=D:\git\DNSConsole\DNSConsole
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Deploy to relative path

Post by davidc »

The browse button will only provide the absolute path. You will need to manually edit it.

Module projects are a special case, because it creates a staging folder before deploying. Therefore, the paths are going to be relative to the starting folder and not the project. We will need to investigate further and see what can be done. In the meantime, I recommend submitting a feature request.
David
SAPIEN Technologies, Inc.
User avatar
claussen
Posts: 19
Last visit: Mon Jan 29, 2024 10:40 am

Re: Deploy to relative path

Post by claussen »

After manually editing the psbuild file it appears it still works. The Deployment Settings GUI shows an error and will not let me save it giving me "Please enter a valid destination path"... But without messing with that, the Deploy button will create the file in the relative path.

My psbuild file now looks like:

Code: Select all

[Deploy]
MainFile=(Source Script)
Destination=DNSConsole
I will submit the feature request. Thanks!
This topic is 5 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.