From b504cec0caf9e87b1766b9bfabae1e9ba63557d2 Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 00:36:55 +0200 Subject: [PATCH 01/18] #147 fix nuget issue --- CryptoNet/CryptoNet.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CryptoNet/CryptoNet.csproj b/CryptoNet/CryptoNet.csproj index 6350371..9932eaf 100644 --- a/CryptoNet/CryptoNet.csproj +++ b/CryptoNet/CryptoNet.csproj @@ -59,8 +59,8 @@ - - + + From 4ffe3863d566408e5716469d090641084e7ed0ee Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 00:42:38 +0200 Subject: [PATCH 02/18] #147 fix code coverage permission issue --- .github/workflows/code-coverage.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 0d068db..6a7e24e 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -1,5 +1,8 @@ name: "3. Code Coverage" +permissions: + contents: write + on: push: branches: @@ -22,6 +25,7 @@ jobs: with: ref: ${{ github.ref }} fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -55,25 +59,22 @@ jobs: name: code-coverage-badge path: coverage/badge_linecoverage.svg - - name: Commit coverage badge + - name: Commit coverage badge (only on main) + if: github.ref == 'refs/heads/main' run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" # Copy badge to root directory - find . -name badge_linecoverage.svg || echo "Badge not found" cp coverage/badge_linecoverage.svg ./coverage-badge.svg - # Force add badge and commit - git add -f coverage-badge.svg - if git diff-index --cached --quiet HEAD; then - echo "No changes to commit" + git add coverage-badge.svg + if git diff --cached --quiet; then + echo "No changes to commit" else - git commit -m 'Update coverage badge' - git push --force + git commit -m "Update coverage badge" + git push fi - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print Directory Structure uses: FiorelaCiroku/XDTesting-Print-Directory-Structure@v1.0.2 From 82b76b7dccc65ea65f763262481d625352fe0358 Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 00:48:47 +0200 Subject: [PATCH 03/18] #147 fix version issues --- .github/workflows/cd-release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index d1a87d0..f1a9124 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -4,11 +4,11 @@ on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+" jobs: build: runs-on: ubuntu-latest - timeout-minutes: 15 steps: @@ -22,7 +22,7 @@ jobs: - name: Extract release notes run: | - git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES + git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d+)?)?(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -30,7 +30,11 @@ jobs: dotnet-version: 8.0.x - name: Set VERSION variable from tag - run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV + run: | + RAW_VERSION=${GITHUB_REF/refs\/tags\/v/} + # replace any accidental leading zeros in prerelease numbers + SANITIZED_VERSION=$(echo $RAW_VERSION | sed -E 's/\.0+([0-9]+)/.\1/g') + echo "VERSION=$SANITIZED_VERSION" >> $GITHUB_ENV - name: Build run: dotnet build --configuration Release /p:Version=${VERSION} From 26ee70557f8f52e849bcbac936e1c81ea8f734fd Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 00:51:49 +0200 Subject: [PATCH 04/18] #147 version issue refix --- .github/workflows/cd-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index f1a9124..e3cf5c2 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -31,10 +31,10 @@ jobs: - name: Set VERSION variable from tag run: | - RAW_VERSION=${GITHUB_REF/refs\/tags\/v/} - # replace any accidental leading zeros in prerelease numbers - SANITIZED_VERSION=$(echo $RAW_VERSION | sed -E 's/\.0+([0-9]+)/.\1/g') - echo "VERSION=$SANITIZED_VERSION" >> $GITHUB_ENV + RAW_VERSION=${GITHUB_REF/refs\/tags\/v/} + # Strip leading zeros from numeric identifiers in pre-release section + SANITIZED_VERSION=$(echo $RAW_VERSION | perl -pe 's/\.0*([0-9]+)/.\1/g') + echo "VERSION=$SANITIZED_VERSION" >> $GITHUB_ENV - name: Build run: dotnet build --configuration Release /p:Version=${VERSION} From c5ffe46b09924fbd8e89ffbf6bdbae0e1b9a8870 Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 00:54:06 +0200 Subject: [PATCH 05/18] #147 retry fix version issue --- .github/workflows/cd-release.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index e3cf5c2..5025f8f 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -32,9 +32,19 @@ jobs: - name: Set VERSION variable from tag run: | RAW_VERSION=${GITHUB_REF/refs\/tags\/v/} - # Strip leading zeros from numeric identifiers in pre-release section - SANITIZED_VERSION=$(echo $RAW_VERSION | perl -pe 's/\.0*([0-9]+)/.\1/g') - echo "VERSION=$SANITIZED_VERSION" >> $GITHUB_ENV + # Split main part and prerelease (if any) + BASE=$(echo $RAW_VERSION | cut -d- -f1) + PRE=$(echo $RAW_VERSION | cut -s -d- -f2-) + + if [ -n "$PRE" ]; then + # Replace .00xx with .xx (strip leading zeros) + PRE=$(echo $PRE | sed -E 's/\.0+([0-9]+)/.\1/g') + VERSION="$BASE-$PRE" + else + VERSION="$BASE" + fi + + echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Build run: dotnet build --configuration Release /p:Version=${VERSION} From e2103f7363ac8b1f830cda681fbdc7657942056b Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 00:56:29 +0200 Subject: [PATCH 06/18] #147 retry fixing --- .github/workflows/cd-release.yml | 41 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index 5025f8f..cbebddc 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -4,7 +4,7 @@ on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-preview*" jobs: build: @@ -22,7 +22,7 @@ jobs: - name: Extract release notes run: | - git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d+)?)?(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES + git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview[0-9A-Za-z\.\-]+)?)?(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -31,20 +31,29 @@ jobs: - name: Set VERSION variable from tag run: | - RAW_VERSION=${GITHUB_REF/refs\/tags\/v/} - # Split main part and prerelease (if any) - BASE=$(echo $RAW_VERSION | cut -d- -f1) - PRE=$(echo $RAW_VERSION | cut -s -d- -f2-) - - if [ -n "$PRE" ]; then - # Replace .00xx with .xx (strip leading zeros) - PRE=$(echo $PRE | sed -E 's/\.0+([0-9]+)/.\1/g') - VERSION="$BASE-$PRE" - else - VERSION="$BASE" - fi - - echo "VERSION=$VERSION" >> $GITHUB_ENV + RAW_VERSION=${GITHUB_REF/refs\/tags\/v/} + + BASE=$(echo $RAW_VERSION | cut -d- -f1) + PRE=$(echo $RAW_VERSION | cut -s -d- -f2-) + + if [ -n "$PRE" ]; then + # Split prerelease into parts by dot and strip leading zeros from numbers + CLEAN_PRE=$(echo $PRE | awk -F. '{ + out=$1; + for (i=2;i<=NF;i++) { + if ($i ~ /^[0-9]+$/) sub(/^0+/, "", $i); + if ($i == "") $i="0"; + out=out"."$i + } + print out + }') + VERSION="$BASE-$CLEAN_PRE" + else + VERSION="$BASE" + fi + + echo "Using VERSION=$VERSION" + echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Build run: dotnet build --configuration Release /p:Version=${VERSION} From c61e99c6b937722365448abe5c3447c8a8d952cd Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 00:59:52 +0200 Subject: [PATCH 07/18] #147 fix more issues with pipeline --- .github/workflows/cd-release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index cbebddc..fa5174d 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -1,4 +1,4 @@ -name: "2. Continuous Deployment (Release)" +name: "2. Continuous Deployment (Release)" on: push: @@ -18,7 +18,14 @@ jobs: fetch-depth: 0 - name: Verify commit exists in origin/main - run: git branch --remote --contains | grep origin/main + run: | + git fetch origin main + if git merge-base --is-ancestor $GITHUB_SHA origin/main; then + echo "✅ Commit exists in main" + else + echo "❌ Commit is not in main" + exit 1 + fi - name: Extract release notes run: | From 74b324166fa7e19c8af469318da23bafd9524fcf Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 01:02:45 +0200 Subject: [PATCH 08/18] #147 revert back still issue --- .github/workflows/cd-release.yml | 38 ++++---------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index fa5174d..934032e 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -4,11 +4,11 @@ on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-preview*" jobs: build: runs-on: ubuntu-latest + timeout-minutes: 15 steps: @@ -18,18 +18,11 @@ jobs: fetch-depth: 0 - name: Verify commit exists in origin/main - run: | - git fetch origin main - if git merge-base --is-ancestor $GITHUB_SHA origin/main; then - echo "✅ Commit exists in main" - else - echo "❌ Commit is not in main" - exit 1 - fi + run: git branch --remote --contains | grep origin/main - name: Extract release notes run: | - git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview[0-9A-Za-z\.\-]+)?)?(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES + git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -37,30 +30,7 @@ jobs: dotnet-version: 8.0.x - name: Set VERSION variable from tag - run: | - RAW_VERSION=${GITHUB_REF/refs\/tags\/v/} - - BASE=$(echo $RAW_VERSION | cut -d- -f1) - PRE=$(echo $RAW_VERSION | cut -s -d- -f2-) - - if [ -n "$PRE" ]; then - # Split prerelease into parts by dot and strip leading zeros from numbers - CLEAN_PRE=$(echo $PRE | awk -F. '{ - out=$1; - for (i=2;i<=NF;i++) { - if ($i ~ /^[0-9]+$/) sub(/^0+/, "", $i); - if ($i == "") $i="0"; - out=out"."$i - } - print out - }') - VERSION="$BASE-$CLEAN_PRE" - else - VERSION="$BASE" - fi - - echo "Using VERSION=$VERSION" - echo "VERSION=$VERSION" >> $GITHUB_ENV + run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV - name: Build run: dotnet build --configuration Release /p:Version=${VERSION} From 316cc2474ead265eab76126eabd0eaa3add1a65a Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 01:12:58 +0200 Subject: [PATCH 09/18] #147 version fix --- .github/workflows/cd-release.yml | 1 + run_release.ps1 | 36 +++++++++++++++++--------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index 934032e..9a22d90 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -4,6 +4,7 @@ on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-preview.*" jobs: build: diff --git a/run_release.ps1 b/run_release.ps1 index e7fc275..0c7a714 100644 --- a/run_release.ps1 +++ b/run_release.ps1 @@ -2,45 +2,47 @@ param( [Parameter(Mandatory = $true, HelpMessage = "Provide the version number in the format 'X.Y.Z', e.g., '3.0.0'.")] [string]$VersionNumber, + [Parameter(Mandatory = $true)] [bool]$IsPreview ) -# Validate the input format +# Validate version number format X.Y.Z if ($VersionNumber -notmatch '^\d+\.\d+\.\d+$') { - Write-Host "Error: Version number must be in the format 'X.Y.Z', e.g., '3.0.0'." -ForegroundColor Red + Write-Host "❌ Error: Version number must be in the format 'X.Y.Z', e.g., '3.0.0'." -ForegroundColor Red exit 1 } -# Generate PreviewVersion dynamically -$Timestamp = (Get-Date -Format "ddMMyy") -$Time = (Get-Date -Format "HHmm") -$PreviewVersion = "$Timestamp.$Time" +# Build preview suffix (valid SemVer identifiers, no leading zeros) +$DatePart = (Get-Date -Format "yyyyMMdd") # e.g. 20250822 +$TimePart = (Get-Date -Format "Hmm") # e.g. 845 (not 0845, no leading zero!) +$PreviewId = "$DatePart.$TimePart" # → "20250822.845" -# Construct the tag and message dynamically +# Construct the tag if ($IsPreview) { - $TagName = "v$VersionNumber-preview$PreviewVersion" + # format: vX.Y.Z-preview.YYYYMMDD.HHmm + $TagName = "v$VersionNumber-preview.$PreviewId" } else { $TagName = "v$VersionNumber" } $Message = "Release version $TagName" -# Display confirmation prompt -Write-Host "You are about to release:" -ForegroundColor Yellow -Write-Host "Tag: $TagName" -ForegroundColor Cyan -Write-Host "Message: $Message" -ForegroundColor Cyan +# Confirm with user +Write-Host "🚀 You are about to release:" -ForegroundColor Yellow +Write-Host " Tag: $TagName" -ForegroundColor Cyan +Write-Host " Message: $Message" -ForegroundColor Cyan $response = Read-Host "Are you sure you want to proceed? (yes/no)" if ($response -ne "yes") { - Write-Host "Release canceled by the user." -ForegroundColor Red + Write-Host "❌ Release canceled by the user." -ForegroundColor Red exit 0 } -# Execute the git commands -Write-Host "Creating tag $TagName with message: $Message" +# Git commands +Write-Host "🔖 Creating tag $TagName with message: $Message" git tag -a $TagName -m $Message -Write-Host "Pushing tag $TagName to origin" +Write-Host "⬆️ Pushing tag $TagName to origin" git push origin $TagName -Write-Host "Tag $TagName pushed successfully." -ForegroundColor Green +Write-Host "✅ Tag $TagName pushed successfully." -ForegroundColor Green From e93a122e0dba4082bc57197d248100456219dc7f Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 01:20:05 +0200 Subject: [PATCH 10/18] #147 fix preview pipeline --- .github/workflows/cd-release-preview.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cd-release-preview.yml b/.github/workflows/cd-release-preview.yml index c593cc6..b2628ea 100644 --- a/.github/workflows/cd-release-preview.yml +++ b/.github/workflows/cd-release-preview.yml @@ -3,12 +3,11 @@ name: "2. Continuous Deployment (Release Preview)" on: push: tags: - - "v[0-9]+\\.[0-9]+\\.[0-9]+-preview[0-9]+\\.[0-9]+" + - "v[0-9]+\\.[0-9]+\\.[0-9]+-preview.*" jobs: build: runs-on: ubuntu-latest - timeout-minutes: 15 steps: From 9f7b703bc20c92ee890c5f009b25d4b401420afb Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 01:23:39 +0200 Subject: [PATCH 11/18] #147 final fix --- .github/workflows/cd-release.yml | 1 - CryptoNet.sln | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index 9a22d90..934032e 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -4,7 +4,6 @@ on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-preview.*" jobs: build: diff --git a/CryptoNet.sln b/CryptoNet.sln index 613fc99..21acf58 100644 --- a/CryptoNet.sln +++ b/CryptoNet.sln @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DevOps", "DevOps", "{1733D1 .gitattributes = .gitattributes .gitignore = .gitignore build.ps1 = build.ps1 + .github\workflows\cd-release-preview.yml = .github\workflows\cd-release-preview.yml .github\workflows\cd-release.yml = .github\workflows\cd-release.yml .github\workflows\ci.yml = .github\workflows\ci.yml .github\workflows\code-coverage.yml = .github\workflows\code-coverage.yml From 5c1835e58a012dbf31ab29b2cd8a8741ae6d143e Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 01:30:54 +0200 Subject: [PATCH 12/18] #147 fix nuget issue --- CryptoNet/CryptoNet.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CryptoNet/CryptoNet.csproj b/CryptoNet/CryptoNet.csproj index 9932eaf..6350371 100644 --- a/CryptoNet/CryptoNet.csproj +++ b/CryptoNet/CryptoNet.csproj @@ -59,8 +59,8 @@ - - + + From 1d722980a30c891ba4d9154e229e62c60b756563 Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 01:40:16 +0200 Subject: [PATCH 13/18] #147 fix nuget issues --- CryptoNet/CryptoNet.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CryptoNet/CryptoNet.csproj b/CryptoNet/CryptoNet.csproj index 6350371..1a599cb 100644 --- a/CryptoNet/CryptoNet.csproj +++ b/CryptoNet/CryptoNet.csproj @@ -59,8 +59,8 @@ - - + + From 8a6c0669ca95f40aaa2efcd55809de92a1472ee1 Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 10:48:39 +0200 Subject: [PATCH 14/18] #147 fix reference ExtShared --- Examples/DSAExample/DSAExample.cs | 2 -- Examples/DSAExample/DSAExample.csproj | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Examples/DSAExample/DSAExample.cs b/Examples/DSAExample/DSAExample.cs index 64c646e..63a5cf8 100644 --- a/Examples/DSAExample/DSAExample.cs +++ b/Examples/DSAExample/DSAExample.cs @@ -5,8 +5,6 @@ using CryptoNet; using CryptoNet.ExtShared; -using System.Runtime.InteropServices; - var confidentialMessage = "Watson, can you hear me?"; diff --git a/Examples/DSAExample/DSAExample.csproj b/Examples/DSAExample/DSAExample.csproj index afce79d..707cac0 100644 --- a/Examples/DSAExample/DSAExample.csproj +++ b/Examples/DSAExample/DSAExample.csproj @@ -9,10 +9,11 @@ - + + From dca0c66f3ea2544039048613b93724d25c796bb6 Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 10:49:11 +0200 Subject: [PATCH 15/18] #147 update and test latest packages --- .../CryptoNet.ExtShared.csproj | 4 ++-- .../CryptoNet.UnitTests.csproj | 20 +++++++++---------- CryptoNet/CryptoNet.csproj | 4 ++-- Examples/AESExample/AESExample.csproj | 2 +- .../Examples.UnitTests.csproj | 18 ++++++++--------- Examples/RSAExample/RSAExample.csproj | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/CryptoNet.ExtShared/CryptoNet.ExtShared.csproj b/CryptoNet.ExtShared/CryptoNet.ExtShared.csproj index 9428a2c..d23c335 100644 --- a/CryptoNet.ExtShared/CryptoNet.ExtShared.csproj +++ b/CryptoNet.ExtShared/CryptoNet.ExtShared.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/CryptoNet.UnitTests/CryptoNet.UnitTests.csproj b/CryptoNet.UnitTests/CryptoNet.UnitTests.csproj index d59fca9..8e676df 100644 --- a/CryptoNet.UnitTests/CryptoNet.UnitTests.csproj +++ b/CryptoNet.UnitTests/CryptoNet.UnitTests.csproj @@ -9,23 +9,23 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + diff --git a/CryptoNet/CryptoNet.csproj b/CryptoNet/CryptoNet.csproj index 1a599cb..8ecd099 100644 --- a/CryptoNet/CryptoNet.csproj +++ b/CryptoNet/CryptoNet.csproj @@ -46,8 +46,8 @@ Never - - + + diff --git a/Examples/AESExample/AESExample.csproj b/Examples/AESExample/AESExample.csproj index afce79d..690cfd4 100644 --- a/Examples/AESExample/AESExample.csproj +++ b/Examples/AESExample/AESExample.csproj @@ -9,7 +9,7 @@ - + diff --git a/Examples/Examples.UnitTests/Examples.UnitTests.csproj b/Examples/Examples.UnitTests/Examples.UnitTests.csproj index 63d7055..92982ae 100644 --- a/Examples/Examples.UnitTests/Examples.UnitTests.csproj +++ b/Examples/Examples.UnitTests/Examples.UnitTests.csproj @@ -14,24 +14,24 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + diff --git a/Examples/RSAExample/RSAExample.csproj b/Examples/RSAExample/RSAExample.csproj index 88ca774..dbec44c 100644 --- a/Examples/RSAExample/RSAExample.csproj +++ b/Examples/RSAExample/RSAExample.csproj @@ -8,7 +8,7 @@ - + From ffc98e86654f0694aa2641cf293733d3ea23f80b Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 12:23:06 +0200 Subject: [PATCH 16/18] #147 adding consumber project --- .../CryptoNet.ConsumerTest.csproj | 14 ++++++++++++++ CryptoNet.ConsumerTest/Program.cs | 11 +++++++++++ CryptoNet.sln | 6 ++++++ 3 files changed, 31 insertions(+) create mode 100644 CryptoNet.ConsumerTest/CryptoNet.ConsumerTest.csproj create mode 100644 CryptoNet.ConsumerTest/Program.cs diff --git a/CryptoNet.ConsumerTest/CryptoNet.ConsumerTest.csproj b/CryptoNet.ConsumerTest/CryptoNet.ConsumerTest.csproj new file mode 100644 index 0000000..10c2fa6 --- /dev/null +++ b/CryptoNet.ConsumerTest/CryptoNet.ConsumerTest.csproj @@ -0,0 +1,14 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + diff --git a/CryptoNet.ConsumerTest/Program.cs b/CryptoNet.ConsumerTest/Program.cs new file mode 100644 index 0000000..23790aa --- /dev/null +++ b/CryptoNet.ConsumerTest/Program.cs @@ -0,0 +1,11 @@ +namespace CryptoNet.ConsumerTest +{ + internal class Program + { + static void Main(string[] args) + { + Console.WriteLine("This is only to test if the latest Nuget package is consumable for nuget.net"); + //todo: implement a test that uses the CryptoNet library + } + } +} diff --git a/CryptoNet.sln b/CryptoNet.sln index 21acf58..048fa2b 100644 --- a/CryptoNet.sln +++ b/CryptoNet.sln @@ -48,6 +48,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Examples.UnitTests", "Examp EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DSAExample", "Examples\DSAExample\DSAExample.csproj", "{7338899C-D3F0-4268-AAE8-45793979D936}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CryptoNet.ConsumerTest", "CryptoNet.ConsumerTest\CryptoNet.ConsumerTest.csproj", "{6BBC4487-140E-44E1-9703-F9F48E805589}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -90,6 +92,10 @@ Global {7338899C-D3F0-4268-AAE8-45793979D936}.Debug|Any CPU.Build.0 = Debug|Any CPU {7338899C-D3F0-4268-AAE8-45793979D936}.Release|Any CPU.ActiveCfg = Release|Any CPU {7338899C-D3F0-4268-AAE8-45793979D936}.Release|Any CPU.Build.0 = Release|Any CPU + {6BBC4487-140E-44E1-9703-F9F48E805589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BBC4487-140E-44E1-9703-F9F48E805589}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BBC4487-140E-44E1-9703-F9F48E805589}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BBC4487-140E-44E1-9703-F9F48E805589}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From c407f754afe89e0485e5504ff2ecdb0b1c4cb255 Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 12:23:18 +0200 Subject: [PATCH 17/18] #147 update doc --- index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.md b/index.md index 9b558f7..5599988 100644 --- a/index.md +++ b/index.md @@ -8,7 +8,7 @@ _layout: landing [![CryptoNet NuGet version](https://img.shields.io/nuget/v/CryptoNet?color=blue)](https://www.nuget.org/packages/CryptoNet/) [![Passing build workflow](https://github.com/itbackyard/CryptoNet/actions/workflows/1-ci.yml/badge.svg)](https://github.com/itbackyard/CryptoNet/actions/workflows/1-ci.yml) [![Generic badge](https://img.shields.io/badge/support-.NET%20Standard%202.0-blue.svg)](https://github.com/itbackyard/CryptoNet) -![Code Coverage](./coverage-badge.svg) +![Code Coverage](https://raw.githubusercontent.com/itbackyard/CryptoNet/refs/heads/main/coverage-badge.svg) [![Build status](https://ci.appveyor.com/api/projects/status/31lrxbhyua22dhq3/branch/main?svg=true)](https://ci.appveyor.com/project/maythamfahmi/cryptonet/branch/main) # Introduction From 83d388994f0fa48d4c5277a858787a4377e8ee07 Mon Sep 17 00:00:00 2001 From: Maytham Fahmi <9260645+maythamfahmi@users.noreply.github.com> Date: Fri, 22 Aug 2025 12:29:25 +0200 Subject: [PATCH 18/18] #147 fix documentaiton genrators prev error on none existing folder --- run_docs.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/run_docs.ps1 b/run_docs.ps1 index e7d63c0..7350ed3 100644 --- a/run_docs.ps1 +++ b/run_docs.ps1 @@ -1,5 +1,10 @@ -Remove-Item .\api -Recurse -Remove-Item .\_site\. -Recurse +if (Test-Path ".\api") { + Remove-Item ".\api" -Recurse -Force +} + +if (Test-Path ".\_site") { + Remove-Item ".\_site" -Recurse -Force +} docfx metadata docfx build .\docfx.json