Comments (5)
Hi Owen, thanks for the report. I'll try to deal with both aspects this weekend.
I'll deal with the subfolder bug first. I think it's just a bug in the 'zip' task and shouldn't take long to fix it.
Secondly, my approach to per-platform parameters is to have multiple config files in the same folder. The only thing missing at the moment is the possibility to share common settings between the configs.
I've deliberated over how to share settings across config files before, but I think I'll just decide on a name for a base config, e.g. 'base.goxc.json', and then both configs will automatically inherit settigs from that.
So, you'd put the version numbers etc in 'base.goxc.json', and then in each config you'd add platform filtering and per-platform options. For darwin you'd run goxc -c=darwin. This is all possible already except you need to specify everything twice (including version number, etc)
For now you can do this.
It works but you'll need to keep all your common settings in sync:
cp .goxc.json darwin.goxc.json
goxc -wc -os='linux windows plan9'
goxc -wc -os=darwin -c=darwin
But, after I've made the change you would do it a bit differently.
mv .goxc.json base.goxc.json
goxc -wc -os='linux windows plan9'
goxc -wc -os=darwin -c=darwin
Then you wouldn't need to duplicate all the common stuff.
I hope that makes sense.
from goxc.
Hey I fixed the 'subdirectories' issue. Please go get -u github.com/laher/goxc
and try it.
More to follow soon. Cheers
from goxc.
Thanks! Already using it!
from goxc.
OK goxc now have 'config inheritance':
- update to latest version
go get -u github.com/laher/goxc
- To prepare your 2 specific configurations (in addition to your main config file), you can run the following commands:
goxc -wc -c=darwin -bc='darwin' -include='myosxfile1,myosxfile2' goxc -wc -c=default -bc='!darwin'
Note the use of single quotes in the -bc option. (because exclamation marks have significance in bash)
This creates 2 new files, (default.goxc.json and darwin.config.json).
Both configs now (as of version 0.8.0) inherit from the main config file (.goxc.json).
- Remove the Darwin-specific entries from the Include line in the base config file '.goxc.json'.
- To invoke the 2 configs, you can use these commands:
goxc goxc -c=darwin
Note that during invocation, the 'default' file 'default.goxc.json' is used by default. If it's not there, goxc will still use the 'base' file .goxc.json.
I hope that all makes sense and solves your problem.
Cheers
from goxc.
Super! I am using it already. Thanks for the hard work! Closing the issue
from goxc.
Related Issues (20)
- Include linux binary in release HOT 1
- How to resolve "WARNING - no debian 'control' file found" HOT 6
- can't cross compile -- wait errors HOT 3
- Error: Stopping after 'xc' failed with error 'The xc task will attempt to compile multiple binaries to the same path HOT 1
- Project Layout for multiple binaries HOT 8
- Ldflags only settable via json config HOT 3
- Deb packages support for conffiles/postinst HOT 1
- Custom build off of a non master branch HOT 1
- Simplify for Go 1.5+ world HOT 1
- Support for FreeBSD
- Create a License file for better overview on github
- Could you borrow some stars to my poor github projects? HOT 1
- [goxc] 2018/10/01 15:04:59 RunTasks error: Wait error: exit status 2 vendor/gopkg.in/goracle.v2
- [goxc] Failing build for Darwin on Go 1.15.x
- question: no linux binaries in releases anymore ?
- ResourcesInclude as a list, rather than a json string would be much nicer
- Installed-Size in deb control file HOT 4
- How to include binaries as part of the ResourcesInclude config settings ? HOT 1
- Bug: difference between zip contents, when the "ResourcesInclude" config setting has a path that is above the main path your building from, and its a windows build. HOT 2
- Making go-vet and go-test ignore vendor directory HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goxc.