Skip to content

Commit

Permalink
use goxc for cross compile
Browse files Browse the repository at this point in the history
probably will need to tune this a bit more when we work towards an
actual release, but seems to be functioning well for now.

piggybacks on the version script to set binary version, if goxc is run
outside of rake task will just make a “snapshot” build which is fine
for now.
  • Loading branch information
mroth committed Mar 17, 2015
1 parent 6260c54 commit fec687e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .goxc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ArtifactsDest": "builds",
"TasksExclude": [
"deb",
"deb-dev"
],
"BuildConstraints": "linux darwin windows",
"ConfigVersion": "0.9"
}
15 changes: 3 additions & 12 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,10 @@ task "features:wip" => :build do
sh "cucumber -s --tags=@wip"
end

# quick and dirty package script, will have to replace with something much more
# robust and also cross platform down the line, but for sending to friends this
# can work for now...
desc "package for distribution"
task :package => [:build] do
DEST = "builds/scmpuff-osx"
tagged_version = `git describe --tags`.chomp()
mkdir_p DEST
cp "bin/scmpuff", DEST
cp "README.md", DEST
cp "CHANGELOG.md", DEST
cp "INSTALL.txt", DEST
sh "tar -C builds -cz -f builds/scmpuff_osx_amd64_#{tagged_version}.tgz scmpuff-osx"
task :package do
tagged_version = `script/version`.chomp()
sh "goxc -pv='#{tagged_version}'"
end
CLOBBER.include "builds"

Expand Down
4 changes: 4 additions & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ fi
if [ ! -x $GOPATH/bin/go-bindata ]; then
go get github.com/jteeuwen/go-bindata/...
fi

if [ ! -x $GOPATH/bin/goxc ]; then
go get github.com/laher/goxc
fi

0 comments on commit fec687e

Please sign in to comment.