Build Automation issue

ok I am writing Build Automation code on a friday afternoon and should wait until monday. For some odd reason the script works fine when I “RUN” the app in the IDE but doesn’t work when I “BUILD” it.

Dim versionY As String = "0000" + PropertyValue("App.MajorVersion")
Dim versionM As String = "00"   + PropertyValue("App.MinorVersion")
Dim versionD As String = "00"   + PropertyValue("App.BugVersion")
Dim versionI As String = PropertyValue("App.NonReleaseVersion")

Dim command As String
command = "/bin/bash -c  ""/bin/echo """ + right( versionY,4 ) +right( versionM,2 ) + right( versionD,2 ) + "-" + versionI + """ > " + CurrentBuildLocationNative + "/../version"""
Dim result As String
result = DoShellCommand( command )
'print command

and the script is setup to run both on the RUN and BUILD. The script should put a file called “version” right next to the executable with a single line in it with the version of the application (20180214-99 format - YYYYMMDD-##)

thanks for any and all help!

Have you set it to be after the build?

yes it is the first task after the build.
second (and last task) is to save the source code

works in a “RUN”
doesn’t work in a “BUILD”
which is very odd to me.

[quote=373934:@scott boss]works in a “RUN”
doesn’t work in a “BUILD”
which is very odd to me.[/quote]

They are building different folders, you might be trying to use a folder that doesn’t exist in the “build” but possibly does exist in a “run”?

I don’t see any checking if the currentbuildlocationnative actually exist.