-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
Currently, .travis.yml makes sure that the go.mod in the repo is fit with the master branch of gotify in every build. Thus every automated build is made against the master branch and thus might not work with the latest release of gotify server.
I suggest adding a update-go-mod target to update the go.mod to fit a certain gotify version:
update-go-mod: create-build-dir
wget -LO ${BUILDDIR}/gotify-server.mod https://raw.githubusercontent.com/gotify/server/${GOTIFY_VERSION}/go.mod
gomod-cap -from ${BUILDDIR}/gotify-server.mod -to go.mod
rm ${BUILDDIR}/gotify-server.mod || true
go mod tidySo in .travis.yml to can do this to build for different versions of gotify.
- before-deploy:
- GO111MODULE=off go get gopkg.in/mikefarah/yq.v2
- >
for TARGET in v1.3.0 v1.3.1 master; do
TARGET_GO_VERSION=$(curl -fsSL "https://raw.githubusercontent.com/gotify/server/$TARGET/.travis.yml" | yq.v2 read - go\[0\]);
eval "$(gimme ${TARGET_GO_VERSION})";
make GOTIFY_VERSION=${TARGET} update-go-mod;
make build;
doneIn this way, the built plugin would be guranteed to have the same go toolchain version and depencencies with the corresponding gotify/server target.
Metadata
Metadata
Assignees
Labels
No labels