alex-hhh / emacs-sql-indent

Syntax based indentation for SQL files inside GNU Emacs
GNU General Public License v3.0
121 stars 18 forks source link

.elpaignore file is not used while building the ELPA sql-indent package #63

Closed alex-hhh closed 4 years ago

alex-hhh commented 6 years ago

The GNU ELPA archive build process looks at an .elpaignore file to exclude files and directories from a git repository which are not needed while using this package. The sql-indent package contains an .elpaignore file listing test directories, but the latest ELPA built archive still contains all the test directories, so something is not working.

We need to investigate why the .elpaignore file from the sql-indent package is not begin used.

Here are some investigations I have done so far

The .elpaignore file is used in the process-arhive target of the GNUMakefile on the master branch of the ELPA repository. Ultimately, the package archive is created using a "tar ... -X .elpaignore" command. If I manually run the tar command in my shell, it seems to do the right thing.

tar chf sql-indent.tar --exclude-vcs -X sql-indent/.elpaignore sql-indent/

However, I ran this command on a Windows machine and the ELPA is built on a GNU Linux machine.

I suspect that the .elpaignore might contain Windows line endings when checking it out on GNU Linux. Perhaps all we need is a .gitattributes file with a "* text=auto" line in it, and perhaps remove and add the .elpaignore file again (the text=auto will not apply to an already checked in file). This would need to be validated with the ELPA build process.

alex-hhh commented 6 years ago

I checked out the repository in a GNU Linux machine and the file has the UNIX line endings. The tar command works correctly there too...

alex-hhh commented 4 years ago

Looks like the latest release from ELPA will use the .elpaignore file and omit directories which are not needed in a release.