Skip to content

Commit 2fff4b9

Browse files
committed
Fix build
1 parent be3244f commit 2fff4b9

File tree

5 files changed

+36
-36
lines changed

5 files changed

+36
-36
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
tags:
55
- 'v*.*.*'
66
env:
7-
VERSION: $(echo $GITHUB_REF | cut -d'-' -f1 | cut -c12-)
7+
RELEASE_VERSION: $(echo $GITHUB_REF | cut -d'-' -f1 | cut -c12-)
88

99
jobs:
1010
build:
@@ -24,8 +24,8 @@ jobs:
2424
2525
- name: Build tldr-sharp
2626
run: |
27-
nuget restore
28-
msbuild tldr-sharp -t:Rebuild -p:TargetFrameworks=net461 -p:Configuration=Release -p:AllowedReferenceRelatedFileExtensions=none
27+
nuget restore tldr-sharp.sln
28+
msbuild tldr-sharp.sln -t:Rebuild -p:TargetFrameworks=net461 -p:Configuration=Release -p:AllowedReferenceRelatedFileExtensions=none
2929
3030
- name: Cache Build
3131
uses: actions/cache@v2
@@ -65,8 +65,8 @@ jobs:
6565
run: |
6666
cp -r tldr-sharp/bin/Release/net461 scripts/windows/release
6767
cp scripts/windows/sqlite3.dll scripts/windows/release/
68-
mv scripts/windows/release/net461/tldr-sharp.exe scripts/windows/release/tldr.exe
69-
mv scripts/windows/release/net461/tldr-sharp.exe.config scripts/windows/release/tldr.exe.config
68+
mv scripts/windows/release/tldr-sharp.exe scripts/windows/release/tldr.exe
69+
mv scripts/windows/release/tldr-sharp.exe.config scripts/windows/release/tldr.exe.config
7070
7171
- name: Download EnVar plugin for NSIS
7272
uses: carlosperate/[email protected]
@@ -87,7 +87,7 @@ jobs:
8787
run: sudo chown -R $(whoami) /usr/share/nsis/Plugins/
8888

8989
- name: Set tldr-sharp version
90-
run: sed -i "s/VERSION_PLACEHOLDER/${{ env.VERSION }}.0/g" "scripts/windows/install.nsi"
90+
run: sed -i "s/VERSION_PLACEHOLDER/${{ env.RELEASE_VERSION }}.0/g" "scripts/windows/install.nsi"
9191

9292
- name: Create nsis installer
9393
uses: joncloud/[email protected]
@@ -126,7 +126,7 @@ jobs:
126126
install -Dm644 "scripts/debian/control" ".debpkg/DEBIAN/control"
127127
install -Dm755 "scripts/debian/postinst" ".debpkg/DEBIAN/postinst"
128128
install -Dm755 "scripts/debian/prerm" ".debpkg/DEBIAN/prerm"
129-
sed -i "s/VERSION_PLACEHOLDER/${{ env.VERSION }}/g" ".debpkg/DEBIAN/control"
129+
sed -i "s/VERSION_PLACEHOLDER/${{ env.RELEASE_VERSION }}/g" ".debpkg/DEBIAN/control"
130130
131131
- name: Build Debian package
132132
run: fakeroot dpkg-deb --build ".debpkg" "tldr-sharp.deb"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ Reopen powershell and run `tldr`.
8585

8686
* Download the latest [release](https://github.com/principis/tldr-sharp/releases)
8787
* Extract to a folder of choice, for example `C:\ProgramData\tldr-sharp`
88-
* Copy `tldr_sharp.exe` to `tldr.exe`
89-
* Copy `tldr_sharp.exe.config` to `tldr.exe.config`
88+
* Copy `tldr-sharp.exe` to `tldr.exe`
89+
* Copy `tldr-sharp.exe.config` to `tldr.exe.config`
9090
* Add it to the path
9191
* Open Control Panel (old style)
9292
* On the **System** page, click **Advanced system settings** on the left-hand side

scripts/test.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,118 +2,118 @@
22
set -x
33
cd tldr-sharp/bin/Release/net461
44

5-
chmod +x tldr_sharp.exe
5+
chmod +x tldr-sharp.exe
66

77
# Test update
8-
mono tldr_sharp.exe -u >/dev/null
8+
mono tldr-sharp.exe -u >/dev/null
99
if [ $? != 0 ]; then
1010
exit 1
1111
fi
12-
mono tldr_sharp.exe --update >/dev/null
12+
mono tldr-sharp.exe --update >/dev/null
1313
if [ $? != 0 ]; then
1414
exit 1
1515
fi
1616

1717
# Test clear cache
18-
mono tldr_sharp.exe -c >/dev/null
18+
mono tldr-sharp.exe -c >/dev/null
1919
if [ $? != 0 ]; then
2020
exit 1
2121
fi
22-
mono tldr_sharp.exe --clear-cache >/dev/null
22+
mono tldr-sharp.exe --clear-cache >/dev/null
2323
if [ $? != 0 ]; then
2424
exit 1
2525
fi
2626

2727
# Test list
28-
mono tldr_sharp.exe --list >/dev/null
28+
mono tldr-sharp.exe --list >/dev/null
2929
if [ $? != 0 ]; then
3030
exit 1
3131
fi
3232

3333
# Test list-all
34-
mono tldr_sharp.exe -a >/dev/null
34+
mono tldr-sharp.exe -a >/dev/null
3535
if [ $? != 0 ]; then
3636
exit 1
3737
fi
38-
mono tldr_sharp.exe --list-all >/dev/null
38+
mono tldr-sharp.exe --list-all >/dev/null
3939
if [ $? != 0 ]; then
4040
exit 1
4141
fi
4242

43-
mono tldr_sharp.exe tar >/dev/null
43+
mono tldr-sharp.exe tar >/dev/null
4444
if [ $? != 0 ]; then
4545
exit 1
4646
fi
4747

4848
# Test help
49-
mono tldr_sharp.exe -h >/dev/null
49+
mono tldr-sharp.exe -h >/dev/null
5050
if [ $? != 0 ]; then
5151
exit 1
5252
fi
53-
mono tldr_sharp.exe --help >/dev/null
53+
mono tldr-sharp.exe --help >/dev/null
5454
if [ $? != 0 ]; then
5555
exit 1
5656
fi
5757

5858
# Test non-existing command
59-
mono tldr_sharp.exe -x >/dev/null
59+
mono tldr-sharp.exe -x >/dev/null
6060
if [ $? == 0 ]; then
6161
exit 1
6262
fi
63-
mono tldr_sharp.exe --fake >/dev/null
63+
mono tldr-sharp.exe --fake >/dev/null
6464
if [ $? == 0 ]; then
6565
exit 1
6666
fi
6767

6868
# Test page
69-
mono tldr_sharp.exe tar >/dev/null
69+
mono tldr-sharp.exe tar >/dev/null
7070
if [ $? != 0 ]; then
7171
exit 1
7272
fi
7373

7474
# Test non-existing page
75-
mono tldr_sharp.exe giberishdsfsd >/dev/null
75+
mono tldr-sharp.exe giberishdsfsd >/dev/null
7676
if [ $? == 0 ]; then
7777
exit 1
7878
fi
7979

8080
# test os
81-
mono tldr_sharp.exe --platform=linux >/dev/null
81+
mono tldr-sharp.exe --platform=linux >/dev/null
8282
if [ $? != 0 ]; then
8383
exit 1
8484
fi
8585

8686
# Test os non-existing page
87-
mono tldr_sharp.exe giberishdsfsd --platform=linux >/dev/null
87+
mono tldr-sharp.exe giberishdsfsd --platform=linux >/dev/null
8888
if [ $? == 0 ]; then
8989
exit 1
9090
fi
9191

9292
# Test list-languages
93-
mono tldr_sharp.exe --list-languages >/dev/null
93+
mono tldr-sharp.exe --list-languages >/dev/null
9494
if [ $? != 0 ]; then
9595
exit 1
9696
fi
9797

9898
# Test list-os
99-
mono tldr_sharp.exe --list-os >/dev/null
99+
mono tldr-sharp.exe --list-os >/dev/null
100100
if [ $? != 0 ]; then
101101
exit 1
102102
fi
103103

104104
# Test version
105-
mono tldr_sharp.exe -v >/dev/null
105+
mono tldr-sharp.exe -v >/dev/null
106106
if [ $? != 0 ]; then
107107
exit 1
108108
fi
109109

110110
# Test search
111-
mono tldr_sharp.exe -s tar >/dev/null
111+
mono tldr-sharp.exe -s tar >/dev/null
112112
if [ $? != 0 ]; then
113113
exit 1
114114
fi
115115

116-
mono tldr_sharp.exe -s giberishdsfsd >/dev/null
116+
mono tldr-sharp.exe -s giberishdsfsd >/dev/null
117117
if [ $? == 0 ]; then
118118
exit 1
119119
fi

scripts/windows_install.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ Copy-Item -Path "$tempDir\*" -Destination $tldrPath
6464
Remove-Item -Path $tempDir -Recurse -Force
6565

6666
if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
67-
New-Item -ItemType SymbolicLink -Target "$tldrPath\tldr_sharp.exe" -Path "$tldrPath/tldr.exe"
68-
New-Item -ItemType SymbolicLink -Target "$tldrPath\tldr_sharp.exe.config" -Path "$tldrPath/tldr.exe.config"
67+
New-Item -ItemType SymbolicLink -Target "$tldrPath\tldr-sharp.exe" -Path "$tldrPath/tldr.exe"
68+
New-Item -ItemType SymbolicLink -Target "$tldrPath\tldr-sharp.exe.config" -Path "$tldrPath/tldr.exe.config"
6969
} else {
70-
Copy-Item -Path "$tldrPath\tldr_sharp.exe" -Destination "$tldrPath\tldr.exe"
71-
Copy-Item -Path "$tldrPath\tldr_sharp.exe.config" -Destination "$tldrPath\tldr.exe.config"
70+
Copy-Item -Path "$tldrPath\tldr-sharp.exe" -Destination "$tldrPath\tldr.exe"
71+
Copy-Item -Path "$tldrPath\tldr-sharp.exe.config" -Destination "$tldrPath\tldr.exe.config"
7272
}
7373

7474
if ($($env:Path).ToLower().Contains($($tldrPath).ToLower()) -eq $false) {

tldr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
/usr/bin/mono /usr/local/lib/tldr/tldr_sharp.exe "$@"
2+
/usr/bin/mono /usr/local/lib/tldr/tldr-sharp.exe "$@"

0 commit comments

Comments
 (0)