Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chop down artifact list in generated ci.yml #395

Open
jeffmay opened this issue Oct 18, 2022 · 5 comments
Open

Chop down artifact list in generated ci.yml #395

jeffmay opened this issue Oct 18, 2022 · 5 comments

Comments

@jeffmay
Copy link

jeffmay commented Oct 18, 2022

It would make pull requests easier to read if the list of artifacts compressed by tar were chopped down. See this example of a workflow that was converted to hand-written to auto-generated

@armanbilge
Copy link
Member

armanbilge commented Oct 18, 2022

Thanks for the issue, but some more context/details about what exactly the problem is would be very helpful :)

Edit: a simple before/after example would be very helpful.

@jeffmay
Copy link
Author

jeffmay commented Oct 18, 2022

Before:

      - name: Compress target directories
        if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
        run: tar cf targets.tar core/target/1-15-jvm-2.13 core/target/1-js-3 core/target/1-js-2.13 joda/target/1-13-jvm-2.12 core/target/1-js-2.12 core/target/1-13-jvm-2.12 core/target/1-15-jvm-2.12 core/target/1-15-js-2.12 joda/target/1-15-jvm-3 joda/target/1-15-jvm-2.13 core/target/1-15-js-2.13 core/target/1-jvm-2.12 joda/target/1-14-jvm-2.13 core/target/1-native-3 target core/target/1-15-jvm-3 core/target/1-15-js-3 joda/target/1-14-jvm-2.12 core/target/1-15-native-3 joda/target/1-jvm-2.13 joda/target/1-15-jvm-2.12 core/target/1-14-jvm-2.12 joda/target/1-jvm-2.12 core/target/1-14-jvm-2.13 core/target/1-jvm-2.13 core/target/1-jvm-3 joda/target/1-jvm-3 core/target/1-15-native-2.13 core/target/1-native-2.13 project/target

After:

      - name: Compress target directories
        if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
        run: |
          tar cf targets.tar \
          core/target/1-13-jvm-2.12 \
          core/target/1-14-jvm-2.12 \
          core/target/1-14-jvm-2.13 \
          core/target/1-15-js-2.12 \
          core/target/1-15-js-2.13 \
          core/target/1-15-js-3 \
          core/target/1-15-jvm-2.12 \
          core/target/1-15-jvm-2.13 \
          core/target/1-15-jvm-3 \
          core/target/1-15-native-2.13 \
          core/target/1-15-native-3 \
          core/target/1-js-2.12 \
          core/target/1-js-2.13 \
          core/target/1-js-3 \
          core/target/1-jvm-2.12 \
          core/target/1-jvm-2.13 \
          core/target/1-jvm-3 \
          core/target/1-native-2.13 \
          core/target/1-native-3 \
          joda/target/1-13-jvm-2.12 \
          joda/target/1-14-jvm-2.12 \
          joda/target/1-14-jvm-2.13 \
          joda/target/1-15-jvm-2.12 \
          joda/target/1-15-jvm-2.13 \
          joda/target/1-15-jvm-3 \
          joda/target/1-jvm-2.12 \
          joda/target/1-jvm-2.13 \
          joda/target/1-jvm-3 \
          project/target \
          target

@armanbilge
Copy link
Member

armanbilge commented Oct 18, 2022

So by "chopped down" do you mean rendering it on a single line?

@jeffmay
Copy link
Author

jeffmay commented Dec 9, 2022

@armanbilge

So by "chopped down" do you mean rendering it on a single line?

I am referring to using \ to put each directory on its own line. See the "before" example for what is currently generated and "after" for what I am proposing.

@rossabaker
Copy link
Member

Note that for generated files, it's possible to collapse the diffs entirely with git attributes, which might be a good g8 template addition. See https://medium.com/@clarkbw/managing-generated-files-in-github-1f1989c09dfd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants