Moving to Beta & Git Hooks #24
Replies: 2 comments 7 replies
-
That's cool.
Good idea. In the last part of the sentence, I think you meant to write "so it only needs refreshing to see changed text".
I think
I don't think that's true anymore. According to the GitHub documentation, the branch and directory can be selected:
Only
Is good. Here you can maybe use Travis again to automate the HTML update.
I agree. What do you think about letting
Works here, just takes a while: $ git branch --show-current
alpha-dev_rake
$ ./validate.sh
================================================
Validating Code Styles via EditorConfig Settings
================================================
Using:
* Node.js v16.8.0
* EClint v2.8.1.
/// Test Passed /// |
Beta Was this translation helpful? Give feedback.
-
Beta vs Final@SicroAtGit, I think that for the Beta release we should make things simple, and just serve the GHPages website from the I just wanted to make the Beta book visible so we can get contributors to participate to the polishing stage. We'll probably need a Git hook to ensure that any commit, merge or rebase to Book TitleThe only thing that I'm still unsure about is the title translation. I keep liking the German style title "The Git Buch", but we might have to consider that such a title could make the book harder to find via search engines. The problem with "Git Book" is that when you search for the term the book Pro Git shows up. E.g. in DuckDuckGo you get in first position:
which is why Pro Git is also known as the "Git Book". Search engines aside, I feel that keeping the German "Buch" in the title confers a strong identity to the book, but that's just my opinion. Alternatively, we'll have to make an editorial choice and come up with some other title (which I don't really like much, since it's a translation, but it's not something unusual either). In any case, this shouldn't be a reason to block the ongoing work, since the HTML files in the website will have to be called just I'll try to fix the remaining pending tasks from #22, and switch to Beta stage as soon as we're ready to go, so the book can finally be visible via the website and I can ask for support on the GH Community. |
Beta Was this translation helpful? Give feedback.
-
@SicroAtGit, we need to decide what to do with the Git hook scripts, since we're heading for the first Beta release (see #22).
install-git-hooks.sh
uninstall-git-hooks.sh
I've starting working on the Rakefile in the
alpha-dev_rake
branch.Right now, the precommit hook CDs
docs_src
and executes./build.sh
— but thedocs_src/build.sh
script has now been deleted and replaced by therake preview
task, which does the same exact thing (but invoking the Asciidoctor API instead of the command line tool).Unlike shell scripts, Rake can be invoked from any repository subfolder and will do the same job — i.e. Rake always runs from the folder where the
Rakefile
is stored.I'm planning to make the preview document
docs_src/Git-Buch_EN.html
ignored by Git, it's only goal being for developers to peek at changes with an HTML doc that doesn't use Data URIs, so it only needs refreshing to see changed images.Since we'll be publishing the HTML book on GHPages, will be building the HTML book in the
docs/
folder (still haven't decided the actual filename, could beGit-Buch_EN.html
,GitBook.html
orGit-Book.html
, we'll discuss that). Also, this requires us to merge the book intomaster
, since GHPages served fromdocs/
only works on the default branch.In any case, updating the HTML document in the
docs/
folder will be considered "publishing" the book, and will probably be assigned totake publish
(haven't yet decided what the default task will be).Contributors will be submitting PRs and changes to
beta-dev
branch, and the HTML book will need to be updated (published) only when merging tomaster
.IMO it would be better if contributors don't rebuild the HTML book, because it would lead to conflicts if they have to rebase, and because any differences in the Asciidoctor version employed would result in different HTML tags and CSS.
Instead, we'll be rebuilding the HTML docs before merging from
beta-dev
intomaster
only — which makes sense, since the doc will only be visible online once it's onmaster
branch, and for previews there's the Preview Doc (untracked).I'm not quite sure that we should keep a Git hook that forces rebuilding the document then. I was thinking instead of having a hook that validates the code styles via EClint, but today I discovered that EClint is not working anymore on this repository (could be that the machine needs a reboot, or due to the Dia downloaded binaries which clutter the repository, although ignored).
I'll have to check if the EClint alternative tool is productions ready (last time I've checked, it still lacked some features we need, but some time has past now). Also, the new edited validation script, which only runs EClint of files which are tracked by Git, takes too long (almost five times longer) and is also buggy in various cases (deleted files, etc.). I should look into a better solution via Rake and a custom Ruby method that could filter out EClint error logs, instead of invoking Git so many times.
So, roughly the issues described above are the starting point for the switch to Rake for automating the project, and the changes required to publish the book on GHPages, which we should decide upon and sort out before moving into the Beta stage.
Even though, this Issue was supposed to be just about the Git hook scripts, it inevitably had to spread out to the general changes that are awaiting us, after all these hooks are there to serve the project even if/when it changes.
All suggestions are welcome, for most of it still mostly brainstorming.
Beta Was this translation helpful? Give feedback.
All reactions