See discussions about these topics in filebrowser/filebrowser issues #399, #450, and #492.
Currently, a single CI service is used: travis-ci.com/filebrowser.
- Manually tag the commit that is to be used in filebrowser/frontend.
NOTE: See semver.org.
- Execute
./build/release.sh $semver
in filebrowser/filebrowser. It will:- Check if the tag exists in filebrowser/frontend.
- Update the submodule to the tag.
- Replace
untracked
with the semver/tag infilebrowser.go
(throughsed
). - Tag filebrowser/filebrowser.
- Revert the semver/tag in change in
filebrowser.go
and commit again.
NOTE:
release.sh
depends ongit
and requiresfrontend
to be a submodule offilebrowser
.
- When the tag in filebrowser/filebrowser is pushed, travis-ci detects it and two of the following stages (
0,1
or0,2
) are automatically executed (see.travis.yml
):- STAGE 0: golang linting tools (gometalinter) are executed. See
build/run_gometalinter.sh
and.gometalinter.json
. - STAGE 1: the frontend and the backend are built, thus
rice-box.go
is created. Seebuild/build_all.sh
.- If the commit is not tagged, docker image
filebrowser/filebrowser
is built and it is pushed to hub.docker.com/r/filebrowser/filebrowser.
- If the commit is not tagged, docker image
- STAGE 2: if the commit is tagged,
- goreleaser is used to build the release artifacts for all the supported platforms and to build a single docker image (tagged/named twice). The artifacts are published to GitHub Releases and the image is pushed to hub.docker.com/r/filebrowser/filebrowser. See
.goreleaser.yml
. ./build/push_ricebox.sh
is executed in order to updaterice-box.go
in filebrowser/caddy/assets.- filebrowser/caddy is cloned.
- A branch named
update-rice-box
is created frommaster
. assets/rice-box.go
is replaced.- A commit is added.
- The commit is tagged.
- The branch and tag are pushed to filebrowser/caddy.
- goreleaser is used to build the release artifacts for all the supported platforms and to build a single docker image (tagged/named twice). The artifacts are published to GitHub Releases and the image is pushed to hub.docker.com/r/filebrowser/filebrowser. See
- STAGE 0: golang linting tools (gometalinter) are executed. See
NOTE: A maintainer is required to merge/squash/rebase branch
update-rice-box
in filebrowser/caddy tomaster
.
HELP: a PR could be automatically created by using the GitHub REST API: https://developer.github.com/v3/pulls/#create-a-pull-request. However, even though creating the PR is quite easy, we don't know how to properly handle the authentication: https://developer.github.com/v3/auth/. Should be willing to help us, please let us know.