Skip to content

Instantly share code, notes, and snippets.

@hieuhani
Created April 5, 2020 08:43
Show Gist options
  • Save hieuhani/870019a41439f311a40bb1b375fdec15 to your computer and use it in GitHub Desktop.
Save hieuhani/870019a41439f311a40bb1b375fdec15 to your computer and use it in GitHub Desktop.
Release to latest branch
#!/bin/sh
yarn install
yarn build
git checkout --orphan latest
mkdir release_tmp
mv packages/ui/dist release_tmp/dist
mv packages/ui/package.json release_tmp
rm -rf packages
rm `find . -type f | grep -Ev '.git|release_tmp|node_modules'`
rm .gitignore
mv release_tmp/* .
rm -rf release_tmp
printf 'node_modules/' > .gitignore
git add .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment