Created
June 19, 2023 22:00
-
-
Save ferki/7a0e4fd038358562c4c9e8ca5b548d0d to your computer and use it in GitHub Desktop.
Preview file changes with Rex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Rex -feature => [ '1.4', 'exec_autodie' ]; | |
| use Rex::Hook::File::Diff; # show diff of file changes by Rex | |
| use if $ENV{PREVIEW}, 'Rex::Hook::File::Impostor'; # use extra hooks if PREVIEW is true | |
| desc 'Demonstrate file preview'; | |
| task 'demo', sub { | |
| file '/tmp/rex_file_preview_demo', content => scalar localtime(); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment