mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-16 12:08:04 +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:
@@ -35,3 +35,6 @@ man/aptly.1.ronn
|
|||||||
.goxc.local.json
|
.goxc.local.json
|
||||||
|
|
||||||
system/env/
|
system/env/
|
||||||
|
|
||||||
|
# created by make build for release artifacts
|
||||||
|
build/
|
||||||
|
|||||||
+18
-1
@@ -29,7 +29,9 @@ matrix:
|
|||||||
- go: 1.9.x
|
- go: 1.9.x
|
||||||
env: RUN_LONG_TESTS=yes
|
env: RUN_LONG_TESTS=yes
|
||||||
- go: 1.10.x
|
- go: 1.10.x
|
||||||
env: RUN_LONG_TESTS=yes
|
env:
|
||||||
|
- RUN_LONG_TESTS=yes
|
||||||
|
- DEPLOY_BINARIES=yes
|
||||||
- go: master
|
- go: master
|
||||||
env: RUN_LONG_TESTS=no
|
env: RUN_LONG_TESTS=no
|
||||||
|
|
||||||
@@ -54,3 +56,18 @@ notifications:
|
|||||||
on_success: change # options: [always|never|change] default: always
|
on_success: change # options: [always|never|change] default: always
|
||||||
on_failure: always # options: [always|never|change] default: always
|
on_failure: always # options: [always|never|change] default: always
|
||||||
on_start: false # default: false
|
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"
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
GOVERSION=$(shell go version | awk '{print $$3;}')
|
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
|
PACKAGES=context database deb files gpg http query swift s3 utils
|
||||||
PYTHON?=python
|
PYTHON?=python
|
||||||
TESTS?=
|
TESTS?=
|
||||||
@@ -31,6 +36,11 @@ endif
|
|||||||
install:
|
install:
|
||||||
go install -v -ldflags "-X main.Version=$(VERSION)"
|
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
|
system/env: system/requirements.txt
|
||||||
ifeq ($(RUN_LONG_TESTS), yes)
|
ifeq ($(RUN_LONG_TESTS), yes)
|
||||||
rm -rf system/env
|
rm -rf system/env
|
||||||
@@ -71,4 +81,4 @@ man:
|
|||||||
version:
|
version:
|
||||||
@echo $(VERSION)
|
@echo $(VERSION)
|
||||||
|
|
||||||
.PHONY: man version
|
.PHONY: man version build
|
||||||
|
|||||||
Reference in New Issue
Block a user