Browse Source

Add improved build script and modify zip script to exclude parent directories

master
Abheek Dhawan 3 years ago
parent
commit
b41e1e677c
  1. 1
      .gitignore
  2. 5
      build.sh
  3. 11
      zip-files.sh

1
.gitignore

@ -354,3 +354,4 @@ MigrationBackup/
# Exclude built binaries # Exclude built binaries
UsmToolkit/bin UsmToolkit/bin
builds/

5
build.sh

@ -0,0 +1,5 @@
#!/bin/bash
dotnet publish -r linux-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -o ./builds/linux-x64
dotnet publish -r win-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -o ./builds/win-x64
dotnet publish -r osx-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -o ./builds/osx-x64

11
zip-files.sh

@ -1,6 +1,15 @@
FOLDERS=UsmToolkit/bin/Release/netcoreapp3.1/*/ #!/bin/bash
cd builds
FOLDERS=*/
for f in $FOLDERS for f in $FOLDERS
do do
zip -r "${f%/*}.zip" $f zip -r "${f%/*}.zip" $f
done done
echo "Cleaning up original directories..."
for f in $FOLDERS
do
rm -R $f
done
echo "Cleaned up. Exiting..."

Loading…
Cancel
Save