Design #1677
release-source script: use shell globbing?
Description
How explicit should release-source.sh
be about which files it copies?
e.g. should we copy *.C
or should we list all dot-C files we wish to copy?
Also should copying be with the -p
flag to preserve timestamps?
History
#1 Updated by John Abbott about 2 years ago
The code Ulrich submitted used the -p
flag when copying.
This may be useful to indicate to people when files were last changed.
I wonder whether the Makefile
in each directory should have atarget to produce a list of the files which should be there.
In my examples/
directory I have a lot of "junk" files (e.g. prototypes) which should not be made public (not yet!)
#2 Updated by John Abbott about 2 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
After discussion with Anna, I have now included the "preserve" flag when copying files to the "release" tree.
Anna also thinks that using globbing is KISS. It certainly makes the script shorter...
Not yet made that change... I'll think about it a bit longer.
#3 Updated by John Abbott over 1 year ago
Rediscovered this issue by chance...
I'm convinced by the "preserve" flag change already made.
I am unconvinced by shell globbing because it might too easy copy "junk" it should not.
On the other hand writing out explicitly which files to copy means more future maintenance
as new source files are added. Really the best solution seems to be to have a single
explicit list somewhere, and use this list for makefile
and the release script, etc.
Probably the simplest is to have a make
target which prints out the list.
An alternative could be a separate "sources" file which can be read by both make
and bash
.
#4 Updated by Anna Maria Bigatti over 1 year ago
John Abbott wrote:
I'm convinced by the "preserve" flag change already made.
I agree
I am unconvinced by shell globbing because it might too easy copy "junk" it should not.
On the other hand writing out explicitly which files to copy means more future maintenance as new source files are added.
My point is that a release should be made from a clean copy of CVS. I use a clean directory to make all checks of consistency in what is CVS-public, and of course I have a personal working copy with all my work-in-progress/experimental code.
I think this double environment keeps the development and CVS safe, and I easily see which files are public (in the snapshot directory) and which are not (in my directory).
Therefore, what is in CVS is what goes in the public release. We could even add to the script the creation of a new clean copy of CVS (it used to be like that!), but that make the release process slower (if you make all the complilations and checks) or less safe (if you just assemble the release directory).
Really the best solution seems to be to have a single
explicit list somewhere, and use this list formakefile
and the release script, etc.Probably the simplest is to have a
make
target which prints out the list.
An alternative could be a separate "sources" file which can be read by bothmake
andbash
.
I'm not entirely convinced, but not strongly opposed. The make
target seems a good idea.
#5 Updated by John Abbott 2 months ago
- Target version changed from CoCoALib-0.99850 to CoCoALib-0.99880