laughedelic / atom-ide-scala

:atom: Scala & Dotty support for Atom IDE (🧟‍♂️ zombie repo)
https://atom.io/packages/ide-scala
MIT License
48 stars 10 forks source link

Publishing generated JS with apm #11

Closed laughedelic closed 6 years ago

laughedelic commented 6 years ago

apm relies on Git/Github in everything. So apm 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 and package.json and to publish from it. I'm not sure if it has to be master or it can be any branch. I will need to dig in the apm install source to understand whether it relies solely on the tag or not.

laughedelic commented 6 years ago

Another idea based on Git detached head trick:

  1. git checkout --detach HEAD
  2. compile sources and git add produced JS file
  3. git commit
  4. git tag and publish

So 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.