diff --git a/.travis.yml b/.travis.yml index 8ec74cd3..ab3274af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,10 @@ install: script: - caddydev --output="caddy" --source="." hugo - go test ./... -- bash automate.sh +- bash dist/automate.sh deploy: provider: bintray - file: bintray.json + file: dist/bintray.json user: hacdias key: secure: gzIpZj4UTnvcpyY3d6+9IThG/5S0vcdvu+/E0fgeryWzKvJVOUFYCNsP1TeFgi3fd64vb+p17UoHA1I6QLc8BPAYpUEGY11JZlSHE13ScAcYSd97IhixL5DMnNWQLGCHoE4v1cUwSKyZYOu9vsjCgZf2JwhJHDMzNMH+5JQxMJcA4A+GsaaqARlxy2NKxA7DwohTPJuxzxMcvoVLlcFM6rCFrqQcHZ+LosVEpSwWm30mlS9BPQPu2Zm0QZruO/xuoufxeC94Szs3nlTXLSrNi05Z7IUvCBJDOEiCzzvX1q7kkIqKE6o2gkb2fkJEdKpocLvtDv2Z2JunN2utzLZrVVOyZ33xhtYcO9df+5y3lREHeWETThoxu64eFifVTp35b/eQUb4BTuFb7WsbCLv8wB1f/oVRcqhjL+RCQVrBjzXb27OwWLK7a1y9yQAgqke07zbsRvk6BbgbIQ5zU4WeYCQmztBct3YkdC9fJQJHp8N+Oui+Jeqnypikinhxd5/RKpFGdOH9V9QDpzS29Dv8CzGtmIog0KpdMcqhZ6K6sZGGFb5z6IC7zQvFBaPZKzFFaKsaQxmnTXwhSyJfWBPjWG/GkUbhbu6QN3gzr3l6l43Gl3PcCk21UwyVZ7KnXvLLujtPPm8CtsCW43O29luJL7iq7ke4yvZnz9Uc7L/Qd3k= diff --git a/automate.sh b/dist/automate.sh similarity index 92% rename from automate.sh rename to dist/automate.sh index bd374169..2d0b1d13 100644 --- a/automate.sh +++ b/dist/automate.sh @@ -22,8 +22,6 @@ cd $BuildDir rm -f caddy* gox $Package -timestamp=$(date +%s) - # Zip them up with release notes and stuff mkdir -p $ReleaseDir cd $ReleaseDir @@ -31,7 +29,7 @@ rm -f caddy* for f in $BuildDir/* do # Name .zip file same as binary, but strip .exe from end - zipname=${timestamp}_$(basename ${f%".exe"}) + zipname=$(basename ${f%".exe"}) if [[ $f == *"linux"* ]] || [[ $f == *"bsd"* ]]; then zipname=${zipname}.tar.gz else @@ -57,4 +55,4 @@ do mv $bin $f done -caddyext remove hugo +sed -i 's/{TIME}/'$(date +%s)'/g' dist/bintray.json diff --git a/bintray.json b/dist/bintray.json similarity index 88% rename from bintray.json rename to dist/bintray.json index e80b72c7..ce2202a0 100644 --- a/bintray.json +++ b/dist/bintray.json @@ -9,7 +9,7 @@ }, "files": [{ "includePattern": "/home/travis/gopath/src/github.com/hacdias/caddy-hugo/Godeps/_workspace:/home/travis/gopath/src/github.com/hacdias/caddy-hugo/dist/release/(.*)", - "uploadPattern": "caddy-hugo/$1" + "uploadPattern": "caddy-hugo/{TIME}/$1" }], "publish": true }