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

script: use --update=none for mv in publish-charts #731

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ytsssun
Copy link
Contributor

@ytsssun ytsssun commented Feb 25, 2025

Description of changes:
We saw failures in workflow run v1.5.0 #4

mv: not replacing './bottlerocket-shadow-1.0.0.tgz'
make: *** [Makefile:138: publish-charts] Error 1

The issue is with the backward incompatible change introduced in coreutils v9.2 for mv so that mv -n would exit with non zero value if the destination file exists.

This is not reproduced in my local dev box because it is using v8.22 and the ubuntu-latest uses v9.4. New approach is introduced in v9.3, which is to use "--update=none".

cp and mv now support --update=none to always skip existing files
in the destination, while not affecting the exit status.
This is equivalent to the --no-clobber behavior from before v9.2.

Testing done:
Test in the ubuntu image with "mv --update=none" for a dummy file and verified that it does move if destination does not exists and does not clobber the file if destination exists. This is the exact behavior we want.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

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.

2 participants