grisp / rebar3_grisp

Rebar plug-in for GRiSP
https://www.grisp.org
Apache License 2.0
21 stars 10 forks source link

Add report command #74

Closed ziopio closed 1 year ago

ziopio commented 1 year ago

Why

We would like to have an easy way for the user to communicate how to reproduce build/deploy problems with the grisp runtime.

How

Run rebar3 grisp report to generate/copy usefull files. Run with --tar to pack such files. Execution example:

rebar3 grisp report
...
Grisp report
======================
Written -> /Users/lucasucci/Desktop/grisp/support/_grisp/report/hash.txt
Written -> /Users/lucasucci/Desktop/grisp/support/_grisp/report/build_overlay.txt
Copied -> /Users/lucasucci/Desktop/grisp/support/_grisp/report/rebar.config
Missing -> /Users/lucasucci/Desktop/grisp/support/rebar.lock
----------------------
New report written at /Users/lucasucci/Desktop/grisp/support/_grisp/report.
Absolute paths have been trimmed for privacy.
----------------------
Please make sure no private information is contained in /Users/lucasucci/Desktop/grisp/support/_grisp/report
You can make any change you want and create a new tarball with "--tar"
===> Done

Requires https://github.com/grisp/grisp_tools/pull/19 If the user then later runs with --tar

rebar3 grisp report --tar
Grisp report
======================
Report directory is already present.
----------------------
Created tarball -> /Users/lucasucci/Desktop/grisp/support/_grisp/grisp-report_2023-03-15T16:48:03+01:00.tar.gz
----------------------
Please make sure no private information is contained in /Users/lucasucci/Desktop/grisp/support/_grisp/report
You can make any change you want and create a new tarball with "--tar"
===> Done

Running --tar right away also generates the tarfile

rebar3 grisp report --tar
Grisp report
======================
Written -> /Users/lucasucci/Desktop/grisp/support/_grisp/report/hash.txt
Written -> /Users/lucasucci/Desktop/grisp/support/_grisp/report/build_overlay.txt
Copied -> /Users/lucasucci/Desktop/grisp/support/_grisp/report/rebar.config
Missing -> /Users/lucasucci/Desktop/grisp/support/rebar.lock
----------------------
New report written at /Users/lucasucci/Desktop/grisp/support/_grisp/report.
Absolute paths have been trimmed for privacy.
----------------------
Created tarball -> /Users/lucasucci/Desktop/grisp/support/_grisp/grisp-report_2023-03-15T16:48:37+01:00.tar.gz
----------------------
Please make sure no private information is contained in /Users/lucasucci/Desktop/grisp/support/_grisp/report
You can make any change you want and create a new tarball with "--tar"
===> Done
ziopio commented 1 year ago

@eproxus @GalaxyGorilla I thought to make everyone happy and let the 2 steps as optional rebar3 grisp report --tar does everything anyway and user is always warned. Outputs are in the this PR description