[Scons-users] Command builder, how to execute svnrevision through action
Bill Deegan
bill at baddogconsulting.com
Tue May 28 17:06:00 EDT 2019
I'd create a script to do this, and run the script with your env.Command()
On Tue, May 28, 2019 at 1:29 PM Pierre-Luc Boily <pierreluc.boily at gmail.com>
wrote:
> Hello,
>
> I have the following Command builder :
> tgt = env.Command(target = 'gwversion.h',
> source = os.path.join('#', srcDir, '..', 'VERSION.txt'),
> action = ['echo creating $TARGET',
> 'echo #define SVN_REVISION `svnversion -n` >
> $TARGET ;',
> 'grep VERSION $SOURCE | awk -F"=" \'{printf (
> "#define GW_VERSION \\"%s\\"\\n", $2)}\' >> $TARGET '
> ])
>
> In the previous code, the following line is not appending to $TARGET :
> echo #define SVN_REVISION `svnversion -n` > $TARGET
>
> I think I have 2 problems
> 1- Command builder is not aware of svnversion, I have to use full path
> 2- Even with full path ('echo #define SVN_REVISION
> `/opt/CollabNet_Subversion/bin/svnversion -n` > $TARGET), I have no luck,
> it
> looks like Action doesn't like back quote
>
> So, my question, how to make my Command builder above working properly? It
> looks simple, I just want to execute to Actions...
>
> thx
>
>
>
> --
> Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20190528/2cf10085/attachment.html>
More information about the Scons-users
mailing list