Situation:
Our Python project is hosted at GitHub. The actual release should only contain handful of files, but or project also contains several non-release files that are required for testing and ironically for packaging, etc.
We roughly follow the GitFlow model, so develop
is our mainline that we build on and stabilize before merging to a master
branch from where the release is made.
Problem:
When we make a release, that release contains not only the actual release files but also contains all the meta and testing stuff. This happens because GitHub's way of creating releases is to simply ZIP up a snapshot of a branch.
Target:
I want the release to contain only the relevant files: 1 Python script, 1 plugin file, 1 config file, 1 license file, 1 readme file.
I want to exclude all test data, test config scripts, meta git files, meta GitHub files, etc.
Ideas:
- Our
master
branch could contain only those relevant files. Care would have to be taken to avoid "contaminating" it with unwanted files during merges fromdevelop
.
Drawback: This prevents us from doing automated verification testing on themaster
branch. - We could introduce a
release
branch (true to GitFlow) and do the verification testing there, then merge only the relevant files to a "clean"master
branch.
Drawback: Having more branches adds more complexity to this small project. - I'm very curious to hear your ideas! What have I completely overlooked?