diff --git a/.editorconfig b/.editorconfig index 51e8cda..051f285 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,12 +2,9 @@ root = true [*] indent_style = space +indent_size = 2 +insert_final_newline = true # Code files [*.{cs}] -indent_size = 4 -insert_final_newline = true - -[*.{js, json}] -indent_size = 2 -insert_final_newline = true \ No newline at end of file +indent_size = 4 \ No newline at end of file diff --git a/.github/workflows/dotnet-package.yml b/.github/workflows/dotnet-package.yml new file mode 100644 index 0000000..d2e20c2 --- /dev/null +++ b/.github/workflows/dotnet-package.yml @@ -0,0 +1,31 @@ +name: Upload dotnet package + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' # SDK Version to use. + - name: Build + working-directory: ./src + run: dotnet build --configuration Release . + - name: Create the package + working-directory: ./src + run: dotnet pack --configuration Release . + - name: Publish the package to nuget.org + working-directory: ./src + run: dotnet nuget push FileTypeInterrogator/bin/Release/FileTypeInterrogator.*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json + env: + NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}} diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index fd04c54..07bcb27 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,13 +10,26 @@ jobs: build: runs-on: ubuntu-latest - steps: + - name: Clean + run: rm -rf *.* - uses: actions/checkout@v2 - - name: Setup .NET + - name: Setup .NET 6 uses: actions/setup-dotnet@v1 with: dotnet-version: '6.0.x' + - name: Setup .NET 5 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.x' + - name: Setup .NET Core 3.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + - name: Setup .NET Core 2.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '2.1.x' - name: Restore dependencies working-directory: ./src run: dotnet restore diff --git a/src/FileTypeInterrogator.Tests/FileTypeInterrogator.Tests.csproj b/src/FileTypeInterrogator.Tests/FileTypeInterrogator.Tests.csproj index 83b3c44..1891661 100644 --- a/src/FileTypeInterrogator.Tests/FileTypeInterrogator.Tests.csproj +++ b/src/FileTypeInterrogator.Tests/FileTypeInterrogator.Tests.csproj @@ -1,28 +1,27 @@  - - netcoreapp2.1;netcoreapp3.1;net5.0;net6.0 - false - + + netcoreapp2.1;netcoreapp3.1;net5.0;net6.0 + false + - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + - - - - - - - Always - - + + + + + + Always + + \ No newline at end of file diff --git a/src/FileTypeInterrogator.Tests/TestFiles/3GP.3gp b/src/FileTypeInterrogator.Tests/TestFiles/3gp.3gp similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/3GP.3gp rename to src/FileTypeInterrogator.Tests/TestFiles/3gp.3gp diff --git a/src/FileTypeInterrogator.Tests/TestFiles/7Z.7z b/src/FileTypeInterrogator.Tests/TestFiles/7z.7z similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/7Z.7z rename to src/FileTypeInterrogator.Tests/TestFiles/7z.7z diff --git a/src/FileTypeInterrogator.Tests/TestFiles/AC3.ac3 b/src/FileTypeInterrogator.Tests/TestFiles/ac3.ac3 similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/AC3.ac3 rename to src/FileTypeInterrogator.Tests/TestFiles/ac3.ac3 diff --git a/src/FileTypeInterrogator.Tests/TestFiles/AI.ai b/src/FileTypeInterrogator.Tests/TestFiles/ai.ai similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/AI.ai rename to src/FileTypeInterrogator.Tests/TestFiles/ai.ai diff --git a/src/FileTypeInterrogator.Tests/TestFiles/AIFF.aiff b/src/FileTypeInterrogator.Tests/TestFiles/aiff.aiff similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/AIFF.aiff rename to src/FileTypeInterrogator.Tests/TestFiles/aiff.aiff diff --git a/src/FileTypeInterrogator.Tests/TestFiles/ASCII.ascii b/src/FileTypeInterrogator.Tests/TestFiles/ascii.ascii similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/ASCII.ascii rename to src/FileTypeInterrogator.Tests/TestFiles/ascii.ascii diff --git a/src/FileTypeInterrogator.Tests/TestFiles/AVI.avi b/src/FileTypeInterrogator.Tests/TestFiles/avi.avi similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/AVI.avi rename to src/FileTypeInterrogator.Tests/TestFiles/avi.avi diff --git a/src/FileTypeInterrogator.Tests/TestFiles/BMP.bmp b/src/FileTypeInterrogator.Tests/TestFiles/bmp.bmp similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/BMP.bmp rename to src/FileTypeInterrogator.Tests/TestFiles/bmp.bmp diff --git a/src/FileTypeInterrogator.Tests/TestFiles/DOC.doc b/src/FileTypeInterrogator.Tests/TestFiles/doc.doc similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/DOC.doc rename to src/FileTypeInterrogator.Tests/TestFiles/doc.doc diff --git a/src/FileTypeInterrogator.Tests/TestFiles/DOCX.docx b/src/FileTypeInterrogator.Tests/TestFiles/docx.docx similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/DOCX.docx rename to src/FileTypeInterrogator.Tests/TestFiles/docx.docx diff --git a/src/FileTypeInterrogator.Tests/TestFiles/FDF.fdf b/src/FileTypeInterrogator.Tests/TestFiles/fdf.fdf similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/FDF.fdf rename to src/FileTypeInterrogator.Tests/TestFiles/fdf.fdf diff --git a/src/FileTypeInterrogator.Tests/TestFiles/FLAC.flac b/src/FileTypeInterrogator.Tests/TestFiles/flac.flac similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/FLAC.flac rename to src/FileTypeInterrogator.Tests/TestFiles/flac.flac diff --git a/src/FileTypeInterrogator.Tests/TestFiles/FLV.flv b/src/FileTypeInterrogator.Tests/TestFiles/flv.flv similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/FLV.flv rename to src/FileTypeInterrogator.Tests/TestFiles/flv.flv diff --git a/src/FileTypeInterrogator.Tests/TestFiles/GIF.gif b/src/FileTypeInterrogator.Tests/TestFiles/gif.gif similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/GIF.gif rename to src/FileTypeInterrogator.Tests/TestFiles/gif.gif diff --git a/src/FileTypeInterrogator.Tests/TestFiles/ICO.ico b/src/FileTypeInterrogator.Tests/TestFiles/ico.ico similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/ICO.ico rename to src/FileTypeInterrogator.Tests/TestFiles/ico.ico diff --git a/src/FileTypeInterrogator.Tests/TestFiles/JP2.jp2 b/src/FileTypeInterrogator.Tests/TestFiles/jp2.jp2 similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/JP2.jp2 rename to src/FileTypeInterrogator.Tests/TestFiles/jp2.jp2 diff --git a/src/FileTypeInterrogator.Tests/TestFiles/JPG.jpg b/src/FileTypeInterrogator.Tests/TestFiles/jpg.jpg similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/JPG.jpg rename to src/FileTypeInterrogator.Tests/TestFiles/jpg.jpg diff --git a/src/FileTypeInterrogator.Tests/TestFiles/MID.mid b/src/FileTypeInterrogator.Tests/TestFiles/mid.mid similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/MID.mid rename to src/FileTypeInterrogator.Tests/TestFiles/mid.mid diff --git a/src/FileTypeInterrogator.Tests/TestFiles/MP3.mp3 b/src/FileTypeInterrogator.Tests/TestFiles/mp3.mp3 similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/MP3.mp3 rename to src/FileTypeInterrogator.Tests/TestFiles/mp3.mp3 diff --git a/src/FileTypeInterrogator.Tests/TestFiles/MP4.mp4 b/src/FileTypeInterrogator.Tests/TestFiles/mp4.mp4 similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/MP4.mp4 rename to src/FileTypeInterrogator.Tests/TestFiles/mp4.mp4 diff --git a/src/FileTypeInterrogator.Tests/TestFiles/OGG.ogg b/src/FileTypeInterrogator.Tests/TestFiles/ogg.ogg similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/OGG.ogg rename to src/FileTypeInterrogator.Tests/TestFiles/ogg.ogg diff --git a/src/FileTypeInterrogator.Tests/TestFiles/PDF.pdf b/src/FileTypeInterrogator.Tests/TestFiles/pdf.pdf similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/PDF.pdf rename to src/FileTypeInterrogator.Tests/TestFiles/pdf.pdf diff --git a/src/FileTypeInterrogator.Tests/TestFiles/PNG.png b/src/FileTypeInterrogator.Tests/TestFiles/png.png similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/PNG.png rename to src/FileTypeInterrogator.Tests/TestFiles/png.png diff --git a/src/FileTypeInterrogator.Tests/TestFiles/PPT.ppt b/src/FileTypeInterrogator.Tests/TestFiles/ppt.ppt similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/PPT.ppt rename to src/FileTypeInterrogator.Tests/TestFiles/ppt.ppt diff --git a/src/FileTypeInterrogator.Tests/TestFiles/PPTX.pptx b/src/FileTypeInterrogator.Tests/TestFiles/pptx.pptx similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/PPTX.pptx rename to src/FileTypeInterrogator.Tests/TestFiles/pptx.pptx diff --git a/src/FileTypeInterrogator.Tests/TestFiles/PSD.psd b/src/FileTypeInterrogator.Tests/TestFiles/psd.psd similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/PSD.psd rename to src/FileTypeInterrogator.Tests/TestFiles/psd.psd diff --git a/src/FileTypeInterrogator.Tests/TestFiles/RA.ra b/src/FileTypeInterrogator.Tests/TestFiles/ra.ra similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/RA.ra rename to src/FileTypeInterrogator.Tests/TestFiles/ra.ra diff --git a/src/FileTypeInterrogator.Tests/TestFiles/TIF.TIF b/src/FileTypeInterrogator.Tests/TestFiles/tif.tif similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/TIF.TIF rename to src/FileTypeInterrogator.Tests/TestFiles/tif.tif diff --git a/src/FileTypeInterrogator.Tests/TestFiles/TTF.ttf b/src/FileTypeInterrogator.Tests/TestFiles/ttf.ttf similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/TTF.ttf rename to src/FileTypeInterrogator.Tests/TestFiles/ttf.ttf diff --git a/src/FileTypeInterrogator.Tests/TestFiles/UTF8.utf8 b/src/FileTypeInterrogator.Tests/TestFiles/utf8.utf8 similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/UTF8.utf8 rename to src/FileTypeInterrogator.Tests/TestFiles/utf8.utf8 diff --git a/src/FileTypeInterrogator.Tests/TestFiles/UTF8BOM.utf8bom b/src/FileTypeInterrogator.Tests/TestFiles/utf8bom.utf8bom similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/UTF8BOM.utf8bom rename to src/FileTypeInterrogator.Tests/TestFiles/utf8bom.utf8bom diff --git a/src/FileTypeInterrogator.Tests/TestFiles/WMV.wmv b/src/FileTypeInterrogator.Tests/TestFiles/wmv.wmv similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/WMV.wmv rename to src/FileTypeInterrogator.Tests/TestFiles/wmv.wmv diff --git a/src/FileTypeInterrogator.Tests/TestFiles/WOFF.woff b/src/FileTypeInterrogator.Tests/TestFiles/woff.woff similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/WOFF.woff rename to src/FileTypeInterrogator.Tests/TestFiles/woff.woff diff --git a/src/FileTypeInterrogator.Tests/TestFiles/XLS.xls b/src/FileTypeInterrogator.Tests/TestFiles/xls.xls similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/XLS.xls rename to src/FileTypeInterrogator.Tests/TestFiles/xls.xls diff --git a/src/FileTypeInterrogator.Tests/TestFiles/XLSX.xlsx b/src/FileTypeInterrogator.Tests/TestFiles/xlsx.xlsx similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/XLSX.xlsx rename to src/FileTypeInterrogator.Tests/TestFiles/xlsx.xlsx diff --git a/src/FileTypeInterrogator.Tests/TestFiles/ZIP.zip b/src/FileTypeInterrogator.Tests/TestFiles/zip.zip similarity index 100% rename from src/FileTypeInterrogator.Tests/TestFiles/ZIP.zip rename to src/FileTypeInterrogator.Tests/TestFiles/zip.zip diff --git a/src/FileTypeInterrogator/FileTypeInterrogator.csproj b/src/FileTypeInterrogator/FileTypeInterrogator.csproj index 36ff624..4c99914 100644 --- a/src/FileTypeInterrogator/FileTypeInterrogator.csproj +++ b/src/FileTypeInterrogator/FileTypeInterrogator.csproj @@ -66,4 +66,4 @@ - + \ No newline at end of file diff --git a/src/FileTypeInterrogator/definitions_flat b/src/FileTypeInterrogator/definitions_flat index a5c67e2..812a583 100644 --- a/src/FileTypeInterrogator/definitions_flat +++ b/src/FileTypeInterrogator/definitions_flat @@ -205,7 +205,7 @@ 0 long 47 Tab Separated Values File tsv text/tab-separated-values 0 long 0001000000 TrueType Font ttf application/font-sfnt 0 long 454E5452595643440200000102001858 Virtual CD vcd application/x-cdlink -0 long 424547494E3A56434152440D0A vCard File vcf text/vcard +0 long 424547494E3A5643415244 vCard File vcf text/vcard 0 long 52494646 57415645666D7420 WAVE Audio File wav audio/x-wav 0 long 1A45DFA3 WebM Video File webm video/webm 0 long 52494646 WebP Image webp image/webp @@ -234,4 +234,4 @@ 0 long 504B0708 Zipped File zip application/zip 30 long 504B4C495445 Zipped File zip application/zip 526 long 504B537058 Zipped File zip application/zip -29152 long 57696E5A6970 Zipped File zip application/zip \ No newline at end of file +29152 long 57696E5A6970 Zipped File zip application/zip