Skip to content

Ensure dotfiles are also included in release archives#56

Merged
fingolfin merged 1 commit intogap-actions:mainfrom
stertooy:also-copy-dotfiles
Mar 11, 2026
Merged

Ensure dotfiles are also included in release archives#56
fingolfin merged 1 commit intogap-actions:mainfrom
stertooy:also-copy-dotfiles

Conversation

@stertooy
Copy link
Contributor

@stertooy stertooy commented Mar 9, 2026

Resolves #55

@stertooy stertooy requested a review from fingolfin March 9, 2026 16:23
Copy link

@james-d-mitchell james-d-mitchell left a comment

Choose a reason for hiding this comment

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

This'll work to resolve my issue, not sure if it might have further implications I'm not aware of though. Thanks @stertooy

@stertooy
Copy link
Contributor Author

stertooy commented Mar 9, 2026

The current situation is a bit contradictory, since using cp -r * target doesn't copy dotfiles in the current directory, but does copy over dotfiles from subdirectories. And we also do some cleanup that includes a lot of dotfiles (which weren't copied over anyway):

release-pkg/action.yml

Lines 148 to 157 in db30629

echo "::group::Cleanup git and github related files"
rm -rvf .git* .hg* .cvs* .circleci
echo "::group::Cleanup codecov, travis, azure-pipelines"
rm -fv .codecov.* .travis.* .appveyor.* azure-pipelines.*
rm -fv .gaplint.*
rm -fv requirements.txt
echo "::group::Cleanup macOS metadata"
find . -name .DS_Store -exec rm -f {} +

Perhaps we should just choose a particular route to take w.r.t. dotfiles:

  1. Never add them to a release by default, but provide an input that lets users specify dotfiles to explicitly add
  2. Copy them over by default, unless it's on our "removal list" (i.e. the code above).

Personally I'm more a fan of option 2. I'd prefer to have this action create functional releases with no extra effort for authors, at the cost of perhaps some unneeded dotfiles slipping through.

@james-d-mitchell
Copy link

I also prefer 2, but I am obviously biased in this case :)

@james-d-mitchell
Copy link

@fingolfin any reason to not merge this?

Copy link
Member

@limakzi limakzi left a comment

Choose a reason for hiding this comment

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

LGTM.

@fingolfin
Copy link
Member

Note that the dotfile cleanup is taken from my old release tool scripts. That one did not copy files over via cp -r. Instead it used git archive to get a fresh snapshot of the git worktree, and then rummaged around in that.

Anyway, I have no objections to this PR (though, should it Close #55 maybe?)

@fingolfin fingolfin merged commit 2f8bc2b into gap-actions:main Mar 11, 2026
3 checks passed
james-d-mitchell added a commit to semigroups/Semigroups that referenced this pull request Mar 11, 2026
The files .VERSION and .LIBSEMIGROUPS_VERSION are missing in the
archive, leading to the v5.6.0 release being unusable:

#1143

See also:

gap-actions/release-pkg#55

When/if:

gap-actions/release-pkg#56

is merged we can revert this change.
@stertooy stertooy deleted the also-copy-dotfiles branch March 11, 2026 16:06
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.

Files with prefix . removed from the archive

4 participants