--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/59858c8d-0bff-437c-a76d-eb769ee4853d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You should use the stamping mentioned in that thread. I.e., add to your genrule:genrule(name = "stomp",stamp = 1,...)Then build the target with --stamp and --workspace_status_command=, e.g.,bazel build --stamp --workspace_status_command=/bin/date //:stompThe output of /bin/date (or whatever you put in there) will be stored in bazel-out/volatile-status.txt, so if you wanted you could read it from the genrule (e.g., if you wanted the script to contact the db).
On Tue, May 9, 2017 at 3:01 PM, JI Ioannidis <jay...@gmail.com> wrote:
I have a genrule that runs a script which pulls some configuration from a database and generates a python file. How do I force it to always run, without having to do a bazel clean first? I found https://groups.google.com/forum/#!searchin/bazel-discuss/always$20build%7Csort:relevance/bazel-discuss/RxLIG44vTMo/z2PDKOZ0DQAJ and the suggestion to use tags = ["external"], but that did't do the trick; the generated file in bazel-build/ remains unchanged.I doubt this matters, but I have build --genrule_strategy=standalone in my tools/bazel.rc (the aforementioned script needs to access ~/.pgpass)Cheers,/ji
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/c1a4f036-19e6-45e1-b1eb-e6c280f3c6a5%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAJdJyYcdPw-8evpH9NnSAyhnO%3D2goFEFPY5QZa6Wr13yzGPChw%40mail.gmail.com.