build.sh 768 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. outPath=./output
  3. rm -rf $outPath
  4. mkdir $outPath
  5. go build ../gogs.go
  6. PLATFORM=$(uname | cut -d _ -f 1)
  7. if [ "$PLATFORM" = "MINGW32" ] || [ "$PLATFORM" = "MINGW64" ] || [ "$PLATFORM" = "CYGWIN" ]; then
  8. GOGS_EXE=gogs.exe
  9. else
  10. GOGS_EXE=gogs
  11. fi
  12. chmod +x $GOGS_EXE
  13. mv $GOGS_EXE $outPath/
  14. cp -r ../conf/ $outPath/conf/
  15. cp -r ../custom/ $outPath/custom/
  16. cp -r dockerfiles/ $outPath/dockerfiles/
  17. cp -r ../public/ $outPath/public/
  18. cp -r ../templates/ $outPath/templates/
  19. cp ../cert.pem $outPath/
  20. cp ../CONTRIBUTING.md $outPath/
  21. cp gogs_supervisord.sh $outPath/
  22. cp ../key.pem $outPath/
  23. cp ../LICENSE $outPath/
  24. cp ../README.md $outPath/
  25. cp ../README_ZH.md $outPath/
  26. cp start.bat $outPath/
  27. cp start.sh $outPath/
  28. cp ../wercker.yml $outPath/
  29. cp mysql.sql $outPath/