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

fix: don't move folders if they are already the same. #3083

Merged
merged 3 commits into from
Jan 16, 2024

Conversation

pandaninjas
Copy link
Contributor

This PR resolves an error when running the Gradle or Maven actions on the root of the repository.
Resolves #2726

Fixes an issue with mv erroring because the files are the same

Signed-off-by: Jocelyn Castellano <admin@malwarefight.wip.la>
Fixes an issue with mv erroring because the files are the same

Signed-off-by: Jocelyn Castellano <admin@malwarefight.wip.la>
Copy link
Contributor

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about test -ef, thank you

Copy link
Collaborator

@laurentsimon laurentsimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Signed-off-by: pandaninjas <admin@malwarefight.wip.la>
@laurentsimon laurentsimon enabled auto-merge (squash) January 16, 2024 16:50
@laurentsimon laurentsimon merged commit b54dfc3 into slsa-framework:main Jan 16, 2024
74 checks passed
laurentsimon added a commit that referenced this pull request Jan 24, 2024
)

Reverts #3083

The PR above was merged but does not fix the problem. Need to revert
@ianlewis
Copy link
Member

TIL about test -ef, thank you

TIL as well. It's interesting that this works for symlinks as well. I didn't expect that.

laurentsimon pushed a commit that referenced this pull request Feb 16, 2024
Fixes the Gradle builds
#2727

I think the first attempt to fix (now reverted) was mostly correct, but
in this PR I correct the directory comparison conditional.

- #3083
- #3089

Also adds some documentation for handling multi-project builds, which
seem to now be the default when initializing a new Gradle app.
-
https://docs.gradle.org/current/samples/sample_building_java_applications.html#review_the_project_files

## Testing

Tested against my own sample project
*
https://github.com/ramonpetgrave64/my-example-gradle-project/pull/1/files/af3b52a88d6bf053d04f3456a8bb78f6d32c4061
*
https://github.com/ramonpetgrave64/my-example-gradle-project/actions/runs/7850051301

Modified the `slsa-framwork/example-package` e2e tests against my own
fork. The actual builds and provenance generation succeed, except for
the verify stage, which should fail because my fork
`https://github.com/ramonpetgrave64/slsa-github-generator/.github/workflows/builder_gradle_slsa3.yml@refs/heads/main`
is not a "trusted builder".

*
ebffcc9
*
main...ramonpetgrave64:slsa-github-generator:67a2f7b7efb421e55c3a787161d5968681f3db15
*
https://github.com/ramonpetgrave64/example-package/actions/runs/7850413736/job/21425770965

---------

Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <32398091+ramonpetgrave64@users.noreply.github.com>
ramonpetgrave64 added a commit that referenced this pull request Mar 20, 2024
ramonpetgrave64 added a commit that referenced this pull request Mar 20, 2024
ramonpetgrave64 added a commit that referenced this pull request Mar 20, 2024
This reverts commit b54dfc3.

Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] The Maven builder fails with a criptyc error on a sample project
4 participants