Skip to content

Instantly share code, notes, and snippets.

@Igosuki
Last active August 29, 2015 14:01
Show Gist options
  • Save Igosuki/8afc9e93aecc28b7c39e to your computer and use it in GitHub Desktop.
Save Igosuki/8afc9e93aecc28b7c39e to your computer and use it in GitHub Desktop.
Publishing to a dump branch for bower

Supposing:

  • The artefact is built with grunt
  • The destination directory of the build is 'dist' and contains all necessary distribution files + bower.json
  • The destination branch is 'build'
  • The the current main branch is 'develop'

Otherwise simply replace accordingly

{
"name": "#{yourrepo}",
"version": "1.0.0",
"dependencies": {
"some-bower-package": "https://#{some-token}:x-oauth-basic@github.com/#{yourgithub}/#{yourrepo}.git#build"
}
}
git branch -D build;
git checkout -b build;
grunt
git add dist -f
git commit -m "chore(release): New build `date`"
git filter-branch --subdirectory-filter dist -f;
git push origin build -f;
git co develop;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment