release-to-git-src.sh 1016 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # /bin/sh
  2. # Create a dist version of the system
  3. cd ../
  4. # Update license before pack
  5. #go-licenses report imuslab.com/zoraxy > system/gomod-license.csv
  6. # Build release distribution
  7. #make
  8. # Create and prepare for a Github release style folder structure
  9. rm -rf ./build/github/src
  10. mkdir ./build/github
  11. mkdir ./build/github/src
  12. # Extract the web.tar.gz to src folder
  13. #tar -xvf ./dist/web.tar.gz -C ./build/github/src
  14. # Copy the mod folder and all root go files
  15. cp -r ./mod ./build/github/src
  16. cp -r ./web ./build/github/src
  17. cp ./*.go ./build/github/src
  18. # Copy other important files
  19. cp Makefile ./build/github/src
  20. cp start.sh ./build/github/src
  21. cp go.mod ./build/github/src
  22. cp go.sum ./build/github/src
  23. # Generate the doc folder for important docs
  24. cp README.md ./build/github/src
  25. # Back to the build folder
  26. cd ./build
  27. echo "Github Release Structure Created"
  28. echo "Moving to Github app scan path"
  29. rm -rf "D:\Github\zoraxy\src"
  30. cp -r ./github/* "D:\Github\zoraxy\src"