Files
webstudio/.devcontainer/postinstall.sh
T
Ivan Starkov d3d19e77fd chore: Add gitclean and gitrebase to devcontainer (#4027)
## Description

Can't leave without this commands

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-31 08:28:14 +03:00

37 lines
1010 B
Bash
Executable File

#!/bin/bash
echo 'eval "$(fzf --bash)"' >> /home/node/.bashrc
mkdir -p /home/node/.local/fzf
touch /home/node/.local/fzf/.bash_history
echo 'export HISTFILE=/home/node/.local/fzf/.bash_history' >> "/home/node/.bashrc"
cd /workspaces/webstudio
sudo corepack enable
corepack install
pnpm config set store-dir $HOME/.pnpm-store
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
find . -name 'lib' -type d -prune -exec rm -rf '{}' +
find . -name 'build' -type d -prune -exec rm -rf '{}' +
find . -name 'dist' -type d -prune -exec rm -rf '{}' +
find . -name '.cache' -type d -prune -exec rm -rf '{}' +
find . -name '.pnpm-store' -type d -prune -exec rm -rf '{}' +
pnpm install
pnpm run build
pnpm migrations migrate
cat << 'EOF' >> /home/node/.bashrc
alias gitclean="(git remote | xargs git remote prune) && git branch -vv | egrep '('\$(git remote | xargs | sed -e 's/ /|/g')')/.*: gone]' | awk '{print \$1}' | xargs -r git branch -D"
alias gitrebase="git rebase --interactive main"
EOF