-
Notifications
You must be signed in to change notification settings - Fork 3
Fix cfgman documentation release #37
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,14 +6,25 @@ | |
|
|
||
| . ~/.server.config || exit $? | ||
|
|
||
| # Known Bug: | ||
| # Does not remove references to directives dropped. This is | ||
| # an issue for branch 'master' directive erasure. | ||
| # clean the current workspace | ||
| gitCleanWorkspace () | ||
| { | ||
| git clean --quiet -xdf --exclude="\.BASE" | ||
| git checkout --quiet -- . | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A checkout command does not belong to a "clean workspace" function. The command itself looks a bit odd. If you want to erase changes to tracked files, then use something like |
||
| } | ||
|
|
||
| for version in `ls -1 $SQUID_VCS_PATH | grep squid | cut -d- -f2`; do | ||
|
|
||
| ! test -d $SQUID_WWW_PATH/content/Versions/$version/cfgman && continue | ||
| # Update the website /Versions/v*/cfgman/ HTML documents | ||
| cd $SQUID_VCS_PATH/squid-$version || continue | ||
| gitCleanWorkspace | ||
| git checkout v$version && | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this script relies on something else fetching changes from the remote repository, I recommend adding a comment about it. Otherwise, it needs to do something like "git fetch". |
||
| ./bootstrap.sh && ./configure && make -C ./doc cfgman && | ||
| mv -f -t $SQUID_WWW_PATH/content/Versions/$version/cfgman ./doc/cfgman/* | ||
|
Comment on lines
+21
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAICT, this particular command sequence ignores failures and lets the current iteration proceed to the "update DYN documents" step that, AFAICT, depends on the failed command. If we do not want to abort the script on failures, should not we proceed to the next iteration instead? |
||
| gitCleanWorkspace | ||
|
|
||
| # Update the website /Doc/config/ DYN documents | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this update use some make-generated files? If yes, we should not clean the working directory before this update (and we should not update if |
||
| ! test -d $SQUID_WWW_PATH/content/Versions/$version/cfgman && continue | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is strange to check whether this directory is present when the above commands rely on its presence to store their result. Should not this test be moved higher, where it used to reside before this PR? |
||
| for directive in $SQUID_WWW_PATH/content/Versions/$version/cfgman/*.html; do | ||
| directive=`basename $directive .html` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is not this bug still present? AFAICT, the DYN part of the loop iterates previously published
*.htmldirective files and does not erase any stale ones.