Skip to content

Commit

Permalink
Use UPXv3.96 (latest) for binaries (#248)
Browse files Browse the repository at this point in the history
* Verify UPX compressed binaries with UPX
* Install UPX v3.96 on CI
* Seperate Build and UPX scripts

Merged-by: Suhas Vishwanath <suhas.vishwanath@thoughtworks.com>
  • Loading branch information
dcRUSTy committed Sep 8, 2020
1 parent 543156a commit d407996
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .talismanrc
Expand Up @@ -23,6 +23,8 @@ fileignoreconfig:
checksum: 7e5442d7ee07a6fad12cf636c5dc2880c69b9593fd286e44d567e178ffdd0194
- filename: global_install_scripts/install.bash
checksum: 5d659125ecbe619ea99f5bc71c2d761b586ce3ec9ccab7683ee54f4ebde9f748
- filename: upx_compress.sh
checksum: 1a5d9b0ebd627646650c86236f4a21df5b4a2bcf26d77c439dd81c7b28ff9aa0
- filename: install.sh
checksum: 871261b64e3321d1e15c02e7fcb84b7f31ff18dabd7b8d6459d8c1f6fc443c3a
scopeconfig:
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -7,7 +7,6 @@ go:
- stable
before_install:
- go get github.com/mattn/goveralls
- sudo apt-get -y install upx-ucl
install: true
jobs:
include:
Expand All @@ -16,7 +15,7 @@ jobs:
- go mod vendor
- go test -covermode=count -coverprofile=coverage.out -v ./...
- "$GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci"
before_deploy: "./build"
before_deploy: "./build && ./upx_compress.sh"
deploy:
provider: releases
draft: true
Expand Down
1 change: 0 additions & 1 deletion build
Expand Up @@ -3,5 +3,4 @@ VERSION=$(git describe --tags HEAD)
export GO111MODULE=on
go get github.com/mitchellh/gox
gox -os="linux darwin windows" -arch="386 amd64" -ldflags="-s -w -X main.Version=${VERSION}"
upx --lzma talisman_{l,d,w}*
shasum -b -a256 talisman_{l,d,w}* > checksums
11 changes: 11 additions & 0 deletions upx_compress.sh
@@ -0,0 +1,11 @@
#!/bin/bash
# UPX Install START
# Install UPX 3.96(Latest for linux) working version
wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
sha256sum upx-3.96-amd64_linux.tar.xz | grep -i 'AC75F5172C1C530D1B5CE7215CA9E94586C07B675A26AF3B97F8421B8B8D413D' || exit -1
tar -xf upx-3.96-amd64_linux.tar.xz
PATH="$PATH:`pwd`/upx-3.96-amd64_linux"
# UPX Install END
upx --lzma talisman_{l,d,w}*
upx -t talisman_{l,d,w}*
shasum -b -a256 talisman_{l,d,w}* > checksums

0 comments on commit d407996

Please sign in to comment.