We plan to drop vendoring, but we still want to allow people to vendor
data if they'd like to allow them to build offline. Let's ignore the
vendor directory so that this doesn't make the working tree dirty.
The docs/man/index.txt file is intended to provide URL mappings
for the HTML hyperlinks ronn(1) can generate for references it finds
in our manual page Markdown source files; e.g., the text strings
"git-config(1)" and "gitignore(5)" can be hyperlinked to appropriate
URLs wherever they appear.
However, because we run ronn in the top-level directory of the project,
the docs/man/index.txt file is never seen or used. Moreover, it contains
only a single URL mapping, and that goes to an older manual page hosting
site (and uses HTTP not HTTPS).
If we generate the index.txt file dynamically before running ronn then
we can extract all the currently listed external manual page references
(i.e., those not referring to other Git LFS manual pages) from the
"SEE ALSO" sections of our *.ronn source files, and map those to
corresponding URLs under either https://git-scm.com/docs/ for Git manual
pages or https://man7.org/linux/man-pages/ for other references.
And by placing this dynamically generated index.txt file in the
top-level directory, we can ensure that ronn will find and utilize it.
Finally, we add our new index.txt to our .gitignore because it's now
generated at build time, and we remove the old docs/man/index.txt file.
Sometimes we'd like to test to see how much of or whether our code is
localized. However, it's very burdensome to create a full localization
in order to do so. To help us, let's create a special, autogenerated
locale, i-reverse, which is generated by simply reversing all the
English words. Add a script to do this automatically for us.
However, don't generate this locale on typical builds, since users might
not have xgotext installed, and adding this locale would bloat the
binary needlessly in most cases.
Let's make sure we build the translations into the binary when possible.
Specifically, if the msgfmt command exists, let's compile the .po files
into .mo files and then embed their contents into the binary using the
generator command to do that.
Let's also ignore the built .mo files and the generated .pot template
files so we don't check them in.
Currently, Git LFS has the benefit of being a single, relocatable
binary. While it is customary to store locales in /usr/share/locales on
Unix systems, this isn't necessarily the case on Windows, and we'd like
to preserve the ability of users to move the binary where they like.
As a result, let's add a program which can be run by go generate that
embeds these translations into the binary. They are Base64-encoded to
make handling them a little easier and avoiding need to write giant
strings of backslashed escape sequences. The reader will note that this
is based off the related command to embed the manual pages.
Scutiger is our reference git-lfs-transfer implementation, so let's
install it during CI, clean up after tests, ignore our temporary
directory, and add code to appropriately make use of the binary in
tests.
If Scutiger is not available, let the tests pass unless we're in CI,
where we should always have the binary available. Also, skip the tests
when the repository is a SHA-256 repository, since Scutiger uses
libgit2, which doesn't yet support SHA-256 repositories.
windres is not always present whereas goversioninfo is easy to install.
This also fixes the generation of resource.syso to be part of the
standard build script instead of only the AppVeyor CI build.
Finally, adapt update-version.sh to patch versioninfo.json.
This fixes the display of the application icon in Windows' uninstall
dialog and allows Inno Setup to use the version information from the
executable.
Note that AppVeyor has windres.exe in all these locations:
C:\cygwin\bin\windres.exe
C:\cygwin64\bin\windres.exe
C:\MinGW\bin\windres.exe
C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin\windres.exe
C:\msys64\mingw32\bin\windres.exe
C:\msys64\mingw64\bin\windres.exe
C:\msys64\usr\bin\windres.exe
C:\Qt\Tools\mingw482_32\bin\windres.exe
C:\Qt\Tools\mingw491_32\bin\windres.exe
C:\Qt\Tools\mingw492_32\bin\windres.exe
C:\Qt\Tools\mingw530_32\bin\windres.exe
C:\Ruby193\DevKit\mingw\bin\windres.exe
C:\Ruby23\DevKit\mingw\bin\windres.exe
C:\Ruby23-x64\DevKit\mingw\bin\windres.exe
But only the Ruby versions work without giving an "preprocessing failed"
error.
Having the repos directory in the docker directory causes it to be
sent to the docker daemon every time, which is a complete waste.
Best solution was to move the repos dir out of dockers
I had 5 ways forward, I picked #6
1) don't sign. That's generally only acceptable for private packages
2) Make whomever edited the changelog last create signed .deb and .dsc.
This seems like a pain for whomever is developing the packages
3) Change the changelog to a uid in the signing.key. I did not like
taking credit away from whomever SHOULD be in the changelog
4) Have the distributing person add the changelog email address as
an additional uid in their pgp key... this sounds like bad practice
to me.
5) Build the .deb package, break it apart, manually sign, and re-
archive. While possible, seemed prone to failure in corner
cases down the road...
6) Use -p option of pgp to point to a script removing the the
--local-user option that was forcing the .deb to be signed by
the last developer of the changelog, not the person generating
the distributions. This seemed best...
Does not handle the public key yet in Debian
This variable is a bit of a mystery to non-Go developers and it's
unclear how you set it up properly. As a result, if it's not set let's
set everything up how Go likes it. Ignore the `src` directory that
we're creating now.
This will also help keep the Homebrew formula simpler.
Closes#388.