Skip to content

Commit d341bf7

Browse files
authored
Merge pull request #128 from link-foundation/issue-125-f3a03b7d
Set root namespace for C# package as `Link.Foundation.Links.Notation` instead of `LinkFoundation.LinksNotation`
2 parents 670551b + db6a516 commit d341bf7

22 files changed

+13
-9
lines changed

.github/workflows/csharp.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- name: Check if version already published to NuGet.org
8282
id: nuget-version-check
8383
run: |
84-
PACKAGE_VERSION=$(grep '<VersionPrefix>' LinkFoundation.LinksNotation/LinkFoundation.LinksNotation.csproj | sed 's/.*<VersionPrefix>\(.*\)<\/VersionPrefix>.*/\1/')
84+
PACKAGE_VERSION=$(grep '<VersionPrefix>' Link.Foundation.Links.Notation/Link.Foundation.Links.Notation.csproj | sed 's/.*<VersionPrefix>\(.*\)<\/VersionPrefix>.*/\1/')
8585
PACKAGE_ID="Link.Foundation.Links.Notation"
8686
echo "Package: $PACKAGE_ID@$PACKAGE_VERSION"
8787
@@ -98,6 +98,8 @@ jobs:
9898
run: |
9999
export REPOSITORY_NAME=$(basename ${{ github.repository }})
100100
wget "$SCRIPTS_BASE_URL/read_csharp_package_info.sh"
101+
# Override path to use namespace-based directory structure
102+
sed -i 's|Platform.$REPOSITORY_NAME/Platform.$REPOSITORY_NAME.csproj|Link.Foundation.Links.Notation/Link.Foundation.Links.Notation.csproj|g' ./read_csharp_package_info.sh
101103
bash ./read_csharp_package_info.sh
102104
- name: Publish NuGet package
103105
if: steps.nuget-version-check.outputs.should_publish == 'true'
@@ -123,21 +125,23 @@ jobs:
123125
run: |
124126
export REPOSITORY_NAME=$(basename ${{ github.repository }})
125127
wget "$SCRIPTS_BASE_URL/read_csharp_package_info.sh"
126-
128+
127129
# Debug: Check apt lock status
128130
echo "=== APT lock debug ==="
129131
lsof /var/lib/dpkg/lock-frontend 2>/dev/null || echo "No process holding dpkg lock"
130132
ps aux | grep -i apt || echo "No apt processes found"
131-
133+
132134
# Wait for any running apt processes to finish
133135
while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do
134136
echo "Waiting for other apt process to finish..."
135137
sleep 5
136138
done
137-
139+
138140
# Add retry logic for apt operations in the script
139141
sed -i 's/sudo apt-get install/sudo apt-get install --fix-missing -y/g' ./read_csharp_package_info.sh
140-
142+
# Override path to use namespace-based directory structure
143+
sed -i 's|Platform.$REPOSITORY_NAME/Platform.$REPOSITORY_NAME.csproj|Link.Foundation.Links.Notation/Link.Foundation.Links.Notation.csproj|g' ./read_csharp_package_info.sh
144+
141145
bash ./read_csharp_package_info.sh
142146
- name: Publish release
143147
run: |
@@ -149,7 +153,7 @@ jobs:
149153
# Override the tag format to use version_language instead of language_version
150154
PACKAGE_VERSION=$(<CSHARP_PACKAGE_VERSION.txt)
151155
PACKAGE_RELEASE_NOTES=$(<CSHARP_PACKAGE_RELEASE_NOTES.txt)
152-
PACKAGE_URL="https://www.nuget.org/packages/Platform.$REPOSITORY_NAME/$PACKAGE_VERSION"
156+
PACKAGE_URL="https://www.nuget.org/packages/Link.Foundation.Links.Notation/$PACKAGE_VERSION"
153157
154158
TAG="${PACKAGE_VERSION}_csharp"
155159
RELEASE_NAME="[C#] $PACKAGE_VERSION"

csharp/LinkFoundation.LinksNotation.Tests/LinkFoundation.LinksNotation.Tests.csproj renamed to csharp/Link.Foundation.Links.Notation.Tests/Link.Foundation.Links.Notation.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</ItemGroup>
2222

2323
<ItemGroup>
24-
<ProjectReference Include="..\LinkFoundation.LinksNotation\LinkFoundation.LinksNotation.csproj" />
24+
<ProjectReference Include="..\Link.Foundation.Links.Notation\Link.Foundation.Links.Notation.csproj" />
2525
</ItemGroup>
2626

2727
</Project>

0 commit comments

Comments
 (0)