apple-mac.command 748 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # MacOS flavoured version of Coburn's autobuild script, since YAML
  3. # can go suck it.
  4. # Cache variables.
  5. WORKDIR=$(pwd)
  6. # Make work directories.
  7. mkdir -p $WORKDIR/ReleaseOut
  8. mkdir -p $WORKDIR/DebugOut
  9. echo Preparing build environment...
  10. dotnet clean
  11. echo Building Debug Library...
  12. dotnet build
  13. echo Stashing...
  14. cp -v Unity/Plugins/x86_64/* $WORKDIR/DebugOut
  15. echo Cleaning up...
  16. dotnet clean
  17. rm -vf Unity/Plugins/x86_64/*
  18. echo Building Release Library...
  19. dotnet build -c Release
  20. echo Stashing
  21. cp -v Unity/Plugins/x86_64/* $WORKDIR/ReleaseOut
  22. echo Compressing...
  23. cd $WORKDIR/ReleaseOut && zip -9 Release.zip libenet.bundle
  24. cd $WORKDIR/DebugOut && zip -9 Debug.zip libenet.bundle
  25. echo End of Build Script. Have a nice day.
  26. exit $?