Skip to content

Commit 6f32aec

Browse files
committed
deploy a release based on tag version
1 parent 232d51c commit 6f32aec

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.travis.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
language: go
2-
32
go:
43
- tip
54

@@ -10,14 +9,17 @@ install:
109
script:
1110
- make test
1211

12+
# This assumes that git tags start with "v", e.g. v0.19
1313
before_deploy:
14-
- make build
14+
- PACKAGE_VERSION=${TRAVIS_TAG:1} make build
1515

16-
deploy:
16+
deploy:
1717
provider: releases
18-
api_key: ${GITHUB_KEY}
19-
file_glob: true
20-
file: "pkg/remote_syslog*"
2118
skip_cleanup: true
19+
api_key:
20+
secure: d3jdocN7D2L3I/Uwj2vIlMGId59zxi1UKxn3AsSC3WERbc9N0m781HmfJe5iD7GW7fp/os1kswb2mtGKLXluNliEOpYutOPlvtQNw8GyovNwK08aeyWm/+oxul36rLnAN81aPBAY11mKKaU0gJOv6Q79yq8ew6OY8D6UdZRyypY=
21+
file: "pkg/remote_syslog*"
22+
file_glob: true
2223
on:
2324
tags: true
25+
condition: ${TRAVIS_TAG:0:1} = "v"

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ depend:
4949
@echo
5050
@echo "\033[32mChecking Dependencies ----> \033[m"
5151

52+
ifndef PACKAGE_VERSION
53+
@echo "\033[1;33mPACKAGE_VERSION is not set. In order to build a package I need PACKAGE_VERSION=n\033[m"
54+
exit 1;
55+
endif
56+
5257
ifndef GOPATH
5358
@echo "\033[1;33mGOPATH is not set. This means that you do not have go setup properly on this machine\033[m"
5459
@echo "$$ mkdir ~/gocode";

packaging/Makefile.packaging

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
PACKAGE_VERSION := 0.19a
21
PACKAGE_NAME := remote_syslog2
32
PACKAGE_VENDOR := "Papertrail Inc."
43
PACKAGE_LICENSE := "MIT License"
54
PACKAGE_CONTACT := [email protected]
65
PACKAGE_DESCRIPTION := "Lightweight self-contained daemon for reading local files and emitting remote syslog (without using local syslog daemon)"
76
PACKAGE_URL := https://github.com/papertrail/remote_syslog2
8-

0 commit comments

Comments
 (0)