build.sh 1.3 KB

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. if [[ "$SHOULD_BUILD" == "yes" ]]; then
  3. cd vscode
  4. yarn
  5. mv product.json product.json.bak
  6. cat product.json.bak | jq 'setpath(["extensionsGallery"]; {"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", "itemUrl": "https://marketplace.visualstudio.com/items"}) | setpath(["nameShort"]; "VSCodium") | setpath(["nameLong"]; "VSCodium") | setpath(["applicationName"]; "vscodium") | setpath(["win32MutexName"]; "vscodium") | setpath(["win32DirName"]; "VSCodium") | setpath(["win32NameVersion"]; "VSCodium") | setpath(["win32RegValueName"]; "VSCodium") | setpath(["win32AppUserModelId"]; "Microsoft.VSCodium") | setpath(["win32ShellNameShort"]; "V&SCodium") | setpath(["urlProtocol"]; "vscodium")' > product.json
  7. cat product.json
  8. export NODE_ENV=production
  9. if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  10. npx gulp vscode-darwin-min
  11. else
  12. # microsoft adds their apt repo to sources
  13. # unless the app name is code-oss
  14. # as we are renaming the application to vscodium
  15. # we need to edit a line in the post install template
  16. sed -i "s/code-oss/vscodium/" resources/linux/debian/postinst.template
  17. npx gulp vscode-linux-x64-min
  18. npx gulp vscode-linux-x64-build-deb
  19. npx gulp vscode-linux-x64-build-rpm
  20. fi
  21. cd ..
  22. fi