Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. build: build_python build_electron
  2. publish: clean publish_github_electron publish_pip publish_github_pages publish_cask
  3. install:
  4. rm -rf ./node_modules
  5. npm install
  6. clean:
  7. rm -rf ./build
  8. build_python:
  9. @[ -d node_modules ] || npm install
  10. rm -rf ./build/python
  11. python ./setup.py build
  12. build_electron:
  13. @[ -d node_modules ] || npm install
  14. npx electron-builder install-app-deps
  15. npx electron-builder --mac --linux --win
  16. start:
  17. @[ -d node_modules ] || npm install
  18. npx electron .
  19. publish_pip:
  20. @[ -d node_modules ] || npm install
  21. rm -rf ./build/python
  22. python ./setup.py build bdist_wheel upload
  23. publish_github_electron:
  24. @[ -d node_modules ] || npm install
  25. npx electron-builder install-app-deps
  26. npx electron-builder --mac --linux --win --publish always --draft false --prerelease false
  27. publish_github_pages:
  28. @[ -d node_modules ] || npm install
  29. python ./setup.py build
  30. rm -rf ./build/gh-pages
  31. git clone [email protected]:lutzroeder/Netron.git ./build/gh-pages --branch gh-pages
  32. rm -rf ./build/gh-pages/*
  33. cp -R ./build/python/lib/netron/* ./build/gh-pages/
  34. rm -rf ./build/gh-pages/*.py
  35. rm -rf ./build/gh-pages/*.pyc
  36. rm -rf ./build/gh-pages/netron
  37. mv ./build/gh-pages/view-browser.html ./build/gh-pages/index.html
  38. git -C ./build/gh-pages add --all
  39. git -C ./build/gh-pages commit --amend --no-edit
  40. git -C ./build/gh-pages push --force origin gh-pages
  41. publish_cask:
  42. @curl -H "Authorization: token $(GITHUB_TOKEN)" https://api.github.com/repos/Homebrew/homebrew-cask/forks -d ''
  43. @export PACKAGE_VERSION=`node -pe "require('./package.json').version"`; \
  44. cask-repair --cask-version $$PACKAGE_VERSION --blind-submit netron
  45. @curl -H "Authorization: token $(GITHUB_TOKEN)" -X "DELETE" https://api.github.com/repos/lutzroeder/homebrew-cask