Final Atomic Buster Posted January 16 Report Share Posted January 16 Hi, Apologies if this was already asked somewhere. I couldn't find any references when searching. I'm new to using Triggers (and Ruby!), and it's making me feel quite dumb 🤣. I've been trying to get the after-update trigger working (a ruby script will get the current changeset and write it to a text file). I know I can get the trigger to run (as with some small changes to the script, I can see it does actually run). But I'm unable to use the environment variable PLASTIC_FINAL_CHANGESET to get the changeset. First, can someone else do a sanity check for me and just make sure that environment variable works? If you're already using it on your repos, just seeing it's working elsewhere would be great to know it's not just broken. Reason I ask, was in my search, I did find there was a bug fix in April 2022 for when it was broken (https://www.plasticscm.com/download/releasenotes/18.104.22.16898), so I wonder if it somehow became broken again... Next, what am I doing wrong? Here's my ruby script: #!/usr/bin/env ruby File.open("changeset.txt", "w") do |f| f.write(@PLASTIC_FINAL_CHANGESET) end I've also tried caching the result first, but it still doesn't work: #!/usr/bin/env ruby changeset = ENV["PLASTIC_FINAL_CHANGESET"] File.open("changeset.txt", "w") do |f| f << changeset end Am I just completely off track with my script and trigger set up? I definitely feel like it! Any help here is much appreciated. Thanks in advance! Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now