Closed laughedelic closed 6 years ago
Another idea based on Git detached head trick:
git checkout --detach HEAD
git add
produced JS filegit commit
git tag
and publishSo the Git history doesn't get messed up with the generate sources, and yet release commits are connected to the state of sources they were produced from:
v0.1.0 v0.2.0 v0.2.1 v0.3.0
/ / / /
a---b---c---d---e---f---g---h---i---j <--'master'
I think it makes sense and is much simpler than maintaining a special separate branch.
apm
relies on Git/Github in everything. Soapm publish
does basically two things:The problem is that we need to distribute the generated JS file, which we don't want to track with Git. But I don't see a way around it.
An idea I have so far is to have a separate Git branch (kind of like
gh-pages
) with the generated JS, readme andpackage.json
and to publish from it. I'm not sure if it has to bemaster
or it can be any branch. I will need to dig in theapm install
source to understand whether it relies solely on the tag or not.