0

In execute shell in build settings I have PROJECT_VERSION variable. I would like to use it in FTP Publishers -> Transfer -> Source files in that way:

build/project_${PROJECT_VERSION}.zip 

but it seems to not be working. How to export this information? I tried also "export" command but it also doesn't work.

1 Answer 1

0

Do you really have to specify the project version? I usually use a wildcard to specify source files when transferring using SSH at least. E.g.

build/project_*.zip

Otherwise you could take a look at this: How to set an environment variable programmatically in Jenkins/Hudson?

Sign up to request clarification or add additional context in comments.

4 Comments

Ok... I can use * in Source files (if I have only one) but I need also add this PROJECT_VERSION to "Remote directory". I want use it in that way: SOMETHING/iOS/${PROJECT_VERSION} - there I can't use *.
You could use the solution given here: stackoverflow.com/a/10626193/5533897
@piotr-wasilewicz Another possibility would be to place the built zip files atbuild/${PROJECT_VERSION}/project_${PROJECT_VERSION}.zip and then set "Source files" to build/**/*.zip, "Remove prefix" to build and "Remote directory" to `SOMETHING/iOS. But this may be a bit ugly ;)
Your previous solution (stackoverflow.com/a/10626193/5533897) works great. Thank you!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.