mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Merge pull request #739 from aptly-dev/travis-binaries
add support for travis attaching build artifacts to releases
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -35,3 +35,6 @@ man/aptly.1.ronn
|
||||
.goxc.local.json
|
||||
|
||||
system/env/
|
||||
|
||||
# created by make build for release artifacts
|
||||
build/
|
||||
|
||||
19
.travis.yml
19
.travis.yml
@@ -29,7 +29,9 @@ matrix:
|
||||
- go: 1.9.x
|
||||
env: RUN_LONG_TESTS=yes
|
||||
- go: 1.10.x
|
||||
env: RUN_LONG_TESTS=yes
|
||||
env:
|
||||
- RUN_LONG_TESTS=yes
|
||||
- DEPLOY_BINARIES=yes
|
||||
- go: master
|
||||
env: RUN_LONG_TESTS=no
|
||||
|
||||
@@ -54,3 +56,18 @@ notifications:
|
||||
on_success: change # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: false # default: false
|
||||
|
||||
before_deploy:
|
||||
- make build
|
||||
- export FILE_TO_UPLOAD=$(ls build/aptly-*)
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
- secure: "MMk5S1Im6RrVudZasjtlCJa/rvRp4oavrR86WI2kQszs1iZIcdGyVhHiOGfWTwMjA/3iPdbAdu/WrjxCwI14GC5ws+rs8ICO6JIZktjtAwlfwlrV+nsrCiYx1EThghq43VEcykgz2UAJoJj/egv+UCEpe8yDTsvJ6we5HiXdTw0="
|
||||
file_glob: true
|
||||
file: "${FILE_TO_UPLOAD}"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
condition: "$DEPLOY_BINARIES = yes"
|
||||
|
||||
14
Makefile
14
Makefile
@@ -1,5 +1,10 @@
|
||||
GOVERSION=$(shell go version | awk '{print $$3;}')
|
||||
VERSION=$(shell git describe --tags | sed 's@^v@@' | sed 's@-@+@g')
|
||||
ifdef TRAVIS_TAG
|
||||
TAG=$(TRAVIS_TAG)
|
||||
else
|
||||
TAG="$(shell git describe --tags)"
|
||||
endif
|
||||
VERSION=$(shell echo $(TAG) | sed 's@^v@@' | sed 's@-@+@g')
|
||||
PACKAGES=context database deb files gpg http query swift s3 utils
|
||||
PYTHON?=python
|
||||
TESTS?=
|
||||
@@ -31,6 +36,11 @@ endif
|
||||
install:
|
||||
go install -v -ldflags "-X main.Version=$(VERSION)"
|
||||
|
||||
build:
|
||||
rm -rf build
|
||||
mkdir -p build
|
||||
go build -v -ldflags "-X main.Version=$(VERSION)" -o "build/aptly-$(VERSION)"
|
||||
|
||||
system/env: system/requirements.txt
|
||||
ifeq ($(RUN_LONG_TESTS), yes)
|
||||
rm -rf system/env
|
||||
@@ -71,4 +81,4 @@ man:
|
||||
version:
|
||||
@echo $(VERSION)
|
||||
|
||||
.PHONY: man version
|
||||
.PHONY: man version build
|
||||
|
||||
Reference in New Issue
Block a user