Skip to content

Instantly share code, notes, and snippets.

@schne324
Last active April 19, 2017 18:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schne324/6ca72fac89f35d961a0d to your computer and use it in GitHub Desktop.
Save schne324/6ca72fac89f35d961a0d to your computer and use it in GitHub Desktop.

Orphan release process:

First, assuming you have stuff built (gulp or grunt build), copy the the dist directory and temporarily store it anywhere outside of the repo

Then execute the following...

  • git checkout --orphan release
  • git rm --cached $(git ls-files)
  • git clean -d -x -f

You should have an empty repo at this point...

Take that dist directory you put elsewhere and move it back into the now empty repo.

Then execute the following...

  • git add -A
  • git commit -m "{Version} release"
  • git tag {Version}
  • git push --tags
#!/bin/bash
echo moving dist to desktop...
mv ./dist ~/Desktop
echo checking out orphan release branch...
git checkout --orphan release
echo cleaning directory...
git rm --cached $(git ls-files)
git clean -d -x -f
echo moving dist back to current directory...
mv ~/Desktop/dist ./
git add -A
echo dist has been added...now you just need to commit, tag, and push
@schne324
Copy link
Author

If you're publishing to npm you'll need to move the package.json file along with the dist...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment