Re: Command builder, how to execute svnrevision through action

Bill Deegan <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CAEyG4CFJG9JyfuHocQ71gtLZwZOKC86CqtGEYJ28AzZ_=-LESg@mail.gmail.com>
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 <[email protected]>
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
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.