Skip to content

Commit

Permalink
Criteo: travis build
Browse files Browse the repository at this point in the history
Change-Id: I6f6913b3f07ede35c40bb92294ee506b0dd9dc4c
  • Loading branch information
Thibault Gilles authored and PHBourquin committed Dec 18, 2020
1 parent ca5c389 commit 62b2fba
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: go

go:
- "1.14.2"

script:
- export VERSION=$(echo $TRAVIS_TAG | sed 's/^v//' )
- export PRERELEASE=$(echo $VERSION | cut -d '-' -f 2)
- sed -i "s/VersionPrerelease = \".*\"/VersionPrerelease = \"$PRERELEASE\"/" version/version.go
- make -j 3 multiarch

sudo: false

before_deploy:
- echo "Deploying $VERSION(-$PRERELEASE) to GitHub releases"
- for d in $(find ./pkg/bin -maxdepth 1 -mindepth 1 -type d | cut -d '/' -f4); do zip -j consul_${VERSION}_${d}.zip ./pkg/bin/${d}/consul* ; done

deploy:
provider: releases
api_key:
secure: D3SCrX3k1UkNnJPi6tjYgoRmVLrDwXq/hvvRh4VD+H8HnYeheJxokhLbvL3IjHFaE/ruoNFeCyIWLGoNVnPtooeUV5+k4m8Raj3utPNV8esLXRVc0vRwpTYPmCbdjXyNuiHtrFI231caQfUv4vKmCWCy8OWu+fO4BUrjcO86HIEIzcG2ovSCRhLmjmAqDuZl077oYZ7xSkScW9yDtU09fCZxsQdxevkxG8pQ0mifPvbXrb9+Vz86VD/3c6S0KeLRaw+OppTreRZcVFQVZJQFyvu9kVWK2MwKlSNXcOKBb62c1HsZluveotnghCAJ/2R/7ndrKCip2iYwTEeNlvsm4apVPJgjndvpw5Av4jgtb5xaY/MyTcS3fKRmlVg6C7Laroq+VOkQXhnDA6I7B7gQWPXG7TChpd8M40Ua7X53JA9SxMxJeVISm9KY/dxQeaffubjE2PzDG0FREZvqrmIEdeXsy8uqdz1T/Ftnu7k4i6rYhadaqSDSyQ7T7yPkdg9wsP0GDPlBeejp/P2kgqcBki6QvM7k/9FaJre29/FhGuiTdCiC927mCLTZUnL2J1QoVL0C7ctDIrMGhwXcZwVEEtuyim4EznNvj9Ds7WgbjdJHWWfHeJ+UHT+ZMY4mciK8MrDWPzKTzPCj+keJg8yiCPMkWJcScZVCj4WBWZd0Z/E=
file_glob: true
file: consul_*.zip
skip_cleanup: true
on:
repo: criteo-forks/consul
tags: true
14 changes: 14 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,20 @@ changelogfmt:
linux:
@$(SHELL) $(CURDIR)/build-support/scripts/build-local.sh -o linux -a amd64

pkg/bin/windows_amd64/consul.exe:
mkdir -p pkg/bin/windows_amd64
GOOS=windows GOARCH=amd64 go build -o pkg/bin/windows_amd64/consul.exe

pkg/bin/linux_amd64/consul:
mkdir -p pkg/bin/linux_amd64
GOOS=linux GOARCH=amd64 go build -o pkg/bin/linux_amd64/consul

pkg/bin/darwin_amd64/consul:
mkdir -p pkg/bin/darwin_amd64
GOOS=darwin GOARCH=amd64 go build -o pkg/bin/darwin_amd64/consul

multiarch: pkg/bin/windows_amd64/consul.exe pkg/bin/linux_amd64/consul pkg/bin/darwin_amd64/consul

# dist builds binaries for all platforms and packages them for distribution
dist:
@$(SHELL) $(CURDIR)/build-support/scripts/release.sh -t '$(DIST_TAG)' -b '$(DIST_BUILD)' -S '$(DIST_SIGN)' $(DIST_VERSION_ARG) $(DIST_DATE_ARG) $(DIST_REL_ARG)
Expand Down

0 comments on commit 62b2fba

Please sign in to comment.