get_repo.sh 346 B

123456789101112131415
  1. #!/bin/bash
  2. if [ -d vscode ]; then
  3. cd vscode
  4. git fetch --all
  5. else
  6. git clone https://github.com/Microsoft/vscode.git
  7. cd vscode
  8. fi
  9. export LATEST_MS_COMMIT=$(git rev-list --tags --max-count=1)
  10. export LATEST_MS_TAG=$(git describe --tags ${LATEST_MS_COMMIT})
  11. echo "Got the latest MS tag: ${LATEST_MS_TAG}"
  12. git checkout $LATEST_MS_TAG
  13. cd ..