From 0760bc09aa64d0f43d6a0a2270bb7a517edb3fb5 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 15 Jun 2020 18:27:20 +0100 Subject: [PATCH] build: fix Windows exe info insertion The goversioninfo tool wasn't being installed in the correct place. This also gets rid of the old Travis and Appveyor stuff from the Makefile --- .github/workflows/build.yml | 5 +++-- Makefile | 35 +++++++++-------------------------- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42f993608..f61b00243 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -197,8 +197,9 @@ jobs: - name: Deploy built binaries shell: bash run: | - if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then make release_dep ; fi - make travis_beta + if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then make release_dep_linux ; fi + if [[ "${{ matrix.os }}" == "windows-latest" ]]; then make release_dep_windows ; fi + make ci_beta env: RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }} # working-directory: '$(modulePath)' diff --git a/Makefile b/Makefile index 25dc499b9..658d6f0dd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL = bash # Branch we are working on -BRANCH := $(or $(APPVEYOR_REPO_BRANCH),$(TRAVIS_BRANCH),$(BUILD_SOURCEBRANCHNAME),$(lastword $(subst /, ,$(GITHUB_REF))),$(shell git rev-parse --abbrev-ref HEAD)) +BRANCH := $(or $(BUILD_SOURCEBRANCHNAME),$(lastword $(subst /, ,$(GITHUB_REF))),$(shell git rev-parse --abbrev-ref HEAD)) # Tag of the current commit, if any. If this is not "" then we are building a release RELEASE_TAG := $(shell git tag -l --points-at HEAD) # Version of last release (may not be on this branch) @@ -85,13 +85,16 @@ check: rclone # Get the build dependencies build_dep: go run bin/get-github-release.go -extract golangci-lint golangci/golangci-lint 'golangci-lint-.*\.tar\.gz' - GO111MODULE=off go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo -# Get the release dependencies -release_dep: +# Get the release dependencies we only install on linux +release_dep_linux: go run bin/get-github-release.go -extract nfpm goreleaser/nfpm 'nfpm_.*_Linux_x86_64.tar.gz' go run bin/get-github-release.go -extract github-release aktau/github-release 'linux-amd64-github-release.tar.bz2' +# Get the release dependencies we only install on Windows +release_dep_windows: + GO111MODULE=off go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo + # Update dependencies update: GO111MODULE=on go get -u ./... @@ -184,27 +187,7 @@ log_since_last_release: compile_all: go run bin/cross-compile.go -compile-only $(BUILDTAGS) $(TAG) -appveyor_upload: - rclone --config bin/travis.rclone.conf -v copy --exclude '*beta-latest*' build/ $(BETA_UPLOAD) -ifndef BRANCH_PATH - rclone --config bin/travis.rclone.conf -v copy --include '*beta-latest*' --include version.txt build/ $(BETA_UPLOAD_ROOT) -endif - @echo Beta release ready at $(BETA_URL) - -circleci_upload: - sudo chown -R $$USER build - find build -type l -delete - gzip -r9v build - ./rclone --config bin/travis.rclone.conf -v copy build/ $(BETA_UPLOAD)/testbuilds -ifndef BRANCH_PATH - ./rclone --config bin/travis.rclone.conf -v copy build/ $(BETA_UPLOAD_ROOT)/test/testbuilds-latest -endif - @echo Beta release ready at $(BETA_URL)/testbuilds - -travis_beta: -ifeq (linux,$(filter linux,$(subst Linux,linux,$(TRAVIS_OS_NAME) $(AGENT_OS)))) - go run bin/get-github-release.go -extract nfpm goreleaser/nfpm 'nfpm_.*\.tar.gz' -endif +ci_beta: git log $(LAST_TAG).. > /tmp/git-log.txt go run bin/cross-compile.go -release beta-latest -git-log /tmp/git-log.txt $(BUILD_FLAGS) $(BUILDTAGS) $(TAG) rclone --config bin/travis.rclone.conf -v copy --exclude '*beta-latest*' build/ $(BETA_UPLOAD) @@ -213,7 +196,7 @@ ifndef BRANCH_PATH endif @echo Beta release ready at $(BETA_URL) -# Fetch the binary builds from travis and appveyor +# Fetch the binary builds from GitHub actions fetch_binaries: rclone -P sync --exclude "/testbuilds/**" --delete-excluded $(BETA_UPLOAD) build/