Commit Graph

432 Commits

Author SHA1 Message Date
brian m. carlson
0ce4e8e9ef
script/packagecloud.rb: add shebang
Since this script is executable and it isn't a native binary, it needs a
shebang.  Add one.
2019-11-26 14:47:19 +00:00
brian m. carlson
cefbabe6f5
script/build-git: try harder to fix Homebrew
For an unknown reason, sometimes libintl.h is missing on macOS when it
should not be.  Try harder to fix this by reinstalling the packages
which are already allegedly installed and forcing an unlink and re-link.
2019-10-24 18:54:53 +00:00
brian m. carlson
e4dcf01c2c
script/packagecloud.rb: make executable
We'd like to run this from the command line, so let's make it
executable.
2019-10-17 17:29:51 +00:00
brian m. carlson
0ba11aede6
release: v2.9.0 2019-10-15 20:56:43 +00:00
brian m. carlson
b1c16cfa8f
Add support for CentOS 8
Build packages for CentOS 8.  Add it to the list of containers we build
for and the list of packages we have downloads available for.

In the gem spec files, use a different tooling on CentOS 8, since the
old method no longer works there.  Build using a more standard gem build
process so that RPM does the abstraction for us now that it's capable of
it.  Stop deleting the root in the install step since we may have
installed things there by that point, and RPM has handled this properly
for many versions.

Since the syntax "%{?el8}" expands to "1" on CentOS 8 and nothing on
earlier versions, add a 0 in front of it any time we use the macro so
that we don't end up with an empty conditional on earlier versions.
"01" is still true and "0" is false, so the logic works out.

It's been verified that the packages still build on CentOS 7 as well as
CentOS 8.
2019-10-09 20:05:32 +00:00
brian m. carlson
78ea047174
script/cibuild: check for code formatting
Sometimes we get contributions from folks who aren't very familiar with
Go.  This is great, but since they aren't familiar with Go, they don't
know to use go fmt or goimports to tidy files.  This leads to files
that are misformatted, which then causes problems when users who do have
these tools are doing development.

Let's help people check formatting automatically by running it as part
of the CI job.  We already check for trailing whitespace, which is
complementary (since it looks at non-Go files as well), and that check
has been effective, so likely this one will be as well.

There is one potential downside: sometimes output changes between
versions of Go.  This is unfortunate, but we'll need to just pin to
whatever version GitHub Actions uses.
2019-10-03 14:18:38 +00:00
brian m. carlson
35d05729d1
script/upload: add a --finalize option
When the build and upload process is automated, the only thing left for
the maintainer to do will be to download the assets, sign the hashes,
and upload the signed manifest.  To make this easy and mostly automated,
add an option to the upload script, --finalize, that downloads assets,
optionally allows the maintainer to inspect them, and then uploads the
signed manifest to the GitHub release.
2019-10-01 14:29:33 +00:00
brian m. carlson
ef92706179
script/upload: move sanity checks into a separate function 2019-10-01 14:29:33 +00:00
brian m. carlson
99c206bee0
script/upload: extract changelog automatically
We already have the changelog in CHANGELOG.md, so there's no point in
requiring the user to provide it.  Let's extract it automatically from
the existing file.
2019-10-01 14:29:33 +00:00
brian m. carlson
2f4a861a4f
script/upload: split downloading assets into a separate function
In the future, we'll want to use this script solely to download assets
and stage them for future processes.  In preparation for that, split the
download function into a separate location.
2019-10-01 14:29:33 +00:00
brian m. carlson
119a5f184d
script/upload: add a --skip-verify flag
While the ability to verify assets is important to ensuring our releases
are intact, we also want to be able to skip this step if we're running
in GitHub Actions.  We may upload assets in multiple steps and not want
to verify immediately, or even have a signed manifest until the final,
manual stages of the process.  Add a --skip-verify flag that allows
skipping the verification process.
2019-10-01 14:29:33 +00:00
brian m. carlson
bca33bfe74
script/upload: handle upload of unsigned hashes
When we automate the release process using GitHub Actions, we'll want to
upload an unsigned list of hashes that the maintainer can then sign and
re-upload.  In order to do so, we'll need to handle the case where we're
uploading an unsigned list of hashes, so teach our upload script about
plain files named "sha256sums".
2019-10-01 14:29:33 +00:00
brian m. carlson
80eb30fc33
script/upload: allow specifying token via GITHUB_TOKEN
Not all users want to write a token to disk.  In addition, specifying
the token like this allows us to use this script on GitHub Actions.
2019-10-01 14:29:33 +00:00
brian m. carlson
c328208062
Switch CI to use GitHub Actions
Currently, we have three different CI systems that handle our CI: Travis
for Linux, CircleCI for macOS, and AppVeyor for Windows.  This results
in widely varying performance across systems and the need to maintain
code that works differently across different CI systems.

In addition, we'd like to use GitHub Actions to automate the release
process, so it makes sense to use it for CI as well.  Switch over by
adding a CI workflow that runs our existing jobs.  Ensure that we filter
out the environment variables that GitHub Actions provides, since they
will cause tests that run "git lfs env" to fail.

Add a script for those jobs where we build a custom Git and install the
appropriate dependencies.  In the cibuild script, hoist the Windows
handling to the top, set a specific environment variable for us to
remember that we're on Windows, and then disable locking, which fails on
Windows and causes the testsuite to abort.  These same environment
variables were set for AppVeyor and are also needed on Windows
development systems.
2019-09-09 14:30:55 +00:00
brian m. carlson
1bc2ef0396
packagecloud: add Ubuntu eoan
This is the current development version, so add it to the list of
distros we can build for.
2019-08-07 14:10:22 +00:00
brian m. carlson
ac4dc13da4
packagecloud: add Fedora 30
Fedora 30 is the current version of Fedora, so add it to the list of
packages to upload.
2019-08-07 14:10:22 +00:00
brian m. carlson
4592c99849
packagecloud: add support for Scientific Linux
Scientific Linux is a rebuild of RHEL, so add it as an option under the
CentOS packages.
2019-08-07 14:10:21 +00:00
brian m. carlson
ac404635b0
Add support for Debian 10
Debian 10 is due to be released on July 6, 2019. In order to ensure that
we can build packages for the release planned in early July, add support
for building on and uploading for Debian 10.
2019-07-15 16:40:31 +00:00
brian m. carlson
7236cefe6e
Remove support for building on Debian 7
Debian 7 is definitively end of life and we can no longer use apt to
fetch packages for it. Consequently, we cannot build Docker images in
order to build packages, so remove it from the list of available builds.
2019-07-15 16:40:31 +00:00
brian m. carlson
4f98099e9f
script/packagecloud: add Ubuntu release disco
Now that Ubuntu 19.04 (disco) has been released, add it to the list of
release that we can upload for.
2019-04-24 19:30:22 +00:00
brian m. carlson
2b38e87e92
script/packagecloud: ignore existing packages
Every time we build a release, we build new CentOS packages of Ruby and
ronn, among others. These packages have the same names as the packages
built during previous releases. However, attempting to upload a package
with an identical name fails because PackageCloud doesn't allow us to
overwrite packages in that way.

To prevent the maintainer from having to delete these packages by hand,
and to allow the maintainer to retry package uploads if they fail
partway through, look for the error message we get if a package already
exists and simply ignore it, continuing on as if no error occurred.
2019-04-24 19:30:21 +00:00
brian m. carlson
b2b2f5b26d
script/packagecloud: remove SLES 12.4
SLES 12.4 is not a valid distribution according to PackageCloud, so we
can't upload RPMs for it. Remove it from the list since it's not usable.
2019-04-23 21:15:53 +00:00
brian m. carlson
d4afd1fda3
script/packagecloud: fix syntax error
Since we now start these array literals with "[" instead of "%w(", close
them with "]" instead of ")".
2019-04-23 21:15:53 +00:00
Andy Neff
2f890d2e8a Update packagecloud.rb 2019-02-28 18:26:50 -05:00
Andy Neff
e7d164af16 Fix comments 2019-02-28 18:26:50 -05:00
Andy Neff
0f2a9503cc Update packagecloud.rb
Closes #3522 and closes #1055

Added EOL dates for every release

A subsequent PR should probably remove all the releases that are already EOLed
2019-02-28 18:26:50 -05:00
brian m. carlson
77b6364996
script/upload: verify assets after uploading
We'd like to ensure we have a complete release when uploading files, in
case a network error occurs or something else unfortunate happens during
the upload process. Moreover, since we publish hashes and signatures, it
makes sense to verify that our assets are correct according to those
signatures, since users will verify them (we hope).

To do so, ensure all the files are uploaded, then download all the files
again using the API URL and verify that the signature is valid on
sha256sums.asc and that the hashes match. If this succeeds, we can, with
high probability, be confident that our release is intact, containing
all the files we expect.
2019-02-21 20:18:56 +00:00
brian m. carlson
4ce2ccf7f5
script/upload: don't strip newlines out of uploaded assets
When uploading binary assets, such as tarballs and zip files, we would
like to retain all of the contents, including newlines and such. To
ensure we do so, use the --data-binary option to curl instead of the -d
option.
2019-02-21 19:58:37 +00:00
brian m. carlson
77aea55748
Merge pull request #3510 from bk2204/release-automation
Release automation
2019-02-08 14:08:32 +00:00
Andy Neff
1d798f4a8c
Add sles 15 support #1055 2019-02-07 16:23:00 -05:00
brian m. carlson
e85c82d88b
script: add a script to upload release assets to GitHub
Currently, the process of uploading release assets to GitHub is manual
and tedious. Add a script, with appropriate --help output, that helps
maintainers create a draft release and upload release assets to GitHub
automatically.
2019-02-07 16:51:30 +00:00
brian m. carlson
dc52bfe3ac
script: add a noninteractive mode to the changelog generator
While the current changelog generator is useful, it is interactive,
which makes it hard to extract the changelog output from the standard
output of the script.  Provide a noninteractive mode, which specifies
sections but doesn't categorize any of the items.  This can be used
to store the output in a file and allow the user to edit it with the
editor of their choice.  This file can then be programmatically inserted
into the various places the changelog entry is required.
2019-02-07 16:51:30 +00:00
brian m. carlson
8af62e17cd
script: add a script to update version numbers
The current release process is mostly manual.  To improve automation,
add a script that updates all the various places we store the version
number in preparation for release.  Make the script idempotent.

In order to generate a changelog entry for the Debian changelog, use
the current user's committer identity and a timestamp similar to those
already used.  Specify a time zone of -0000, as that means that the
timestamp is in UTC, but unlike +0000, doesn't imply that we ourselves
are in that timezone.
2019-02-07 15:36:27 +00:00
Torbjörn Klatt
42d075b53f
build package for Ubuntu 18.10 aka Cosmic
Based on PR #2961 this should enable builds for Ubuntu Cosmic.
2018-11-29 19:52:44 +01:00
brian m. carlson
4d5a56a1fb
script: check for trailing whitespace as part of CI
Since we'd like to avoid trailing whitespace in our codebase, help
developers catch issues by checking for trailing whitespace during CI.
Exclude the vendor directory, as we don't want to change vendored code,
and exclude any git objects or indices we store in the repository, since
they're binary zlib-compressed data.  Exclude batch files as well, since
they contain carriage returns, which are considered non-linefeed
whitespace on Unix.

Note that we use git grep -E, since not all versions of git grep are
compiled with PCRE for the -P option.  Fortunately, POSIX provides a
character class that matches all whitespace.
2018-10-04 14:18:44 +00:00
Andy Neff
798d22654b
Update packagecloud.rb
Updating Fedoras to supported versions and adding opensuse and sles #1055 

Fedora 22-26 are EOL https://fedoraproject.org/wiki/End_of_life
SLES 12.2 is EOL 6 months after 12.3 came out https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP2/#Intro.Lifecycle
Only openSUSE 15 and 42.3 are not EOL https://en.opensuse.org/Lifetime
Mint Tara added https://linuxmint.com/download_all.php
2018-08-29 18:08:51 -04:00
Taylor Blau
114e85c200 all: use Go Modules instead of Glide
Since we are now building on Go 1.11 (as of 074a2d4f (all: use Go 1.11
in CI, 2018-08-28)) and Go 1.11 supports Go Modules [1], let's stop
using Glide, and begin using Go Modules.

This involves a few things:

  * Teach the Makefile how to build go.sum files instead of glide.lock
    files.

  * Teach continuous integration services to build Git LFS in a
    non-$GOPATH environment, since (without setting GO111MODULE=on
    explicitly, which we choose not to do), this will break compiling
    Git LFS, because Go 1.11 will ignore modules present in a Go
    checkout beneath $GOPATH.

  * In order to do the above, let's also make sure that we are
    un-setting $GOCACHE in the environment, as this causes Go to work
    without modules support [2].

  * Because we're no longer building in a `$GOPATH`-based location,
    let's instruct the CircleCI base image to archive the new location,
    too.

  * Similarly, teach the RPM spec to build in a non-$GOPATH location.

  * By contrast, since we use dh_golang to build git-lfs binaries on
    Debian, let's wait until the upstream dh_golang package is released
    with support for Go 1.11 module support explicitly. Therefore, force
    GO111MODULE to be on so that we can build a copy of Git LFS whose
    checkout is within a $GOPATH.

Although the go.mod versions match the glide.yaml ones, the diff
attached is large because Go Modules do not vendor `_test.go` files,
whereas Glide does.

[1]: https://golang.org/doc/go1.11#modules
[2]: `GOCACHE=on` will be deprecated in Go 1.12, so this change makes
     sense for that reason, too.

Co-authored-by: brian m. carlson <bk2204@github.com>
2018-08-29 13:25:47 -04:00
Taylor Blau
191091340c script/install.sh: mark as executable
In [1], it is noted that script/install.sh is no longer executable when
run from the tarball'd and zip'd release artifacts that we distribute as
a part of the normal Git LFS release process.

This is due to 22351986 (Makefile: replace script/bootstrap with
'make', 'make all', 2018-07-19), where this file lost permission
100755 and gained permission 100644.

The later is no longer executable, but needs to be. So, let's restore it
as such.

[1]: https://github.com/git-lfs/git-lfs/issues/3154
2018-07-27 10:52:30 -05:00
Taylor Blau
b35566444e script/cibuild: default GOIMPORTS of 'goimports' 2018-07-24 16:07:36 -05:00
Taylor Blau
56b84d8d65 script/cibuild: 💅 2018-07-24 14:40:44 -05:00
Taylor Blau
0c71650351 script/man: remove outdated 2018-07-24 14:40:25 -05:00
Taylor Blau
813fdbdb52 Merge branch 'master' into ttaylorr/makefile 2018-07-23 12:44:24 -05:00
Taylor Blau
351c81fc5d Merge branch 'master' into ttaylorr/prove 2018-07-23 11:12:04 -05:00
David Calavera
09f9f5f4f6
Abort script/test on error.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2018-07-20 16:16:14 -07:00
Taylor Blau
c591ff7fbb appveyor.yml: ensure tests are functional on Windows 2018-07-20 15:18:55 -05:00
Taylor Blau
74b0e5920d Makefile: replace script/man with 'make man' target 2018-07-19 14:03:54 -05:00
Taylor Blau
f2862a5f8e script: remove unused script/run 2018-07-19 13:16:26 -05:00
Taylor Blau
3a1a3c12c2 script: remove unused script/update-version 2018-07-19 13:15:52 -05:00
Taylor Blau
2235198650 Makefile: replace script/bootstrap with 'make', 'make all' 2018-07-19 13:14:39 -05:00
Taylor Blau
b78688a18d Makefile: replace script/test with phony 'test' target 2018-07-16 16:25:54 -05:00