build.sh 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #!/bin/bash
  2. # @Contact : liuyuqi.gov@msn.cn
  3. # @Time : 2023/03/19 19:11:52
  4. # @License : (C)Copyright 2022 liuyuqi.
  5. # @Desc : build apk
  6. ###############################################################################
  7. source /etc/profile
  8. echo "source /etc/profile" >> ~/.bashrc
  9. # clean
  10. sudo journalctl --vacuum-size=1K
  11. # rm -rf ~/.gradle
  12. # rm -rf ~/.android
  13. export JAVA_HOME=/usr/local/openjdk-11
  14. # export JAVA_HOME=/root/.sdkman/candidates/java/21.0.1-ms/
  15. # source "$HOME/.sdkman/bin/sdkman-init.sh"
  16. # sdk list java
  17. # sdk install java 8.0.392-librca
  18. # sdk default java 8.0.392-librca
  19. # sdk install java 11.0.24-librca
  20. # sdk install java 17.0.11-ms
  21. # docker
  22. # echo $DOCKER_HOST
  23. # unset DOCKER_HOST
  24. # sudo usermod -aG docker $USER
  25. docker run -d -p 4444:4444 -p 5900:5900 -e VNC_PASSWORD=123456 selenium/standalone-chrome
  26. docker run -d --restart=on-failure \
  27. --name my_workspace \
  28. --cap-add=SYS_PTRACE \
  29. --gpus all \
  30. --shm-size=1024m \
  31. -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
  32. -p 10022:22 \
  33. -p 14000:4000 \
  34. gezp/ubuntu-desktop:20.04-cu11.0
  35. # set gopath
  36. # export PATH=$PATH:$GOPATH/bin
  37. # mkdir /workspace/RStudio-container
  38. export PATH=$PATH:$(go env GOPATH)/bin
  39. # sql
  40. # SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
  41. # rust
  42. PATH="$HOME/.cargo/bin:$PATH"
  43. vim /usr/bin/pack-cli/node_modules/.bin/pack-cli/src/rust/rustc
  44. pake https://git.yoqi.me --name zzky --hide-title-bar
  45. # nodejs
  46. export NODE_OPTIONS=--openssl-legacy-provider
  47. yarn config set strict-ssl false
  48. # rstudio
  49. # -e PASSWORD=rstudio
  50. # docker run --rm -ti -p 8787:8787 -e DISABLE_AUTH=true -e ROOT=true -v /workspace/aa:/workspace/aa rocker/rstudio:4.4.1
  51. # docker run --rm -ti rocker/tidyverse R
  52. # php
  53. # https://github.dev/yiisoft/yii2-docker
  54. # composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
  55. # composer create-project --prefer-dist yiisoft/yii2-app-basic basic
  56. # docker-compose up -d
  57. # docker-compose ps
  58. # docker-compose stop xx
  59. # docker-compose kill
  60. # docker-compose run --rm php composer install
  61. # docker compose exec php bash
  62. # flutter
  63. export PUB_HOSTED_URL=https://pub.flutter-io.cn
  64. export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
  65. # cd /opt/flutter
  66. # git checkout 2.0.5
  67. # git checkout 3.7.9
  68. # git checkout 3.13.8
  69. # flutter doctor
  70. # cd /workspace/flutter_you
  71. # flutter build apk
  72. # flutter build apk --debug
  73. # flutter pub get
  74. # android
  75. # cd /workspace/packagehunter
  76. # chmod +x gradlew
  77. # ./gradlew assembleDebug
  78. # ./gradlew cleanBuildCache
  79. # aapt package -f \
  80. # -M AndroidManifest.xml \
  81. # -I "$ANDROID_HOME/platforms/android-N/android.jar" \
  82. # -S res/ \
  83. # -J gen/ \
  84. # -m \
  85. # java
  86. # mvn clean package -Dmaven.test.skip=true
  87. # node
  88. # cd
  89. # yarn && yarn build
  90. # yarn && yarn dev
  91. # go
  92. # cd
  93. # go build
  94. # python
  95. # pip install -r requirements.txt
  96. # python main.py
  97. # docker
  98. cd /workspace/blog
  99. docker compose -f "docker-compose.debug.yml" down
  100. docker compose -f "docker-compose.debug.yml" up -d --build
  101. docker compose -f "docker-compose.debug.yml" up -d --build node_container
  102. # docker exec -it java_container /bin/sh
  103. docker exec -it node_container /bin/bash
  104. # java
  105. cd /app/qihang.ecom.erp/framework
  106. mvn package && mvn install
  107. cd /app/qihang.ecom.erp/ecerp-api
  108. mvn spring-boot:run