-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build process for .NET Core 2.2 on Mac and Linux
- Loading branch information
1 parent
409316d
commit a3f3f7a
Showing
4 changed files
with
48 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
bin | ||
/bin | ||
/obj | ||
/tmp | ||
*.pidb | ||
test-results | ||
*.userprefs |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,51 @@ | ||
PREFIX=/usr/local | ||
VERSION=`git describe` | ||
|
||
all: bin/Release/tack.exe | ||
all: build-mac build-linux | ||
|
||
bin/Release/tack.exe: lib/markdownsharp/bin/Release/MarkdownSharp.dll ext/nustache/Nustache.Core/bin/Release/Nustache.Core.dll | ||
xbuild /property:Configuration=Release tack.csproj | ||
uninstall: | ||
rm -rf ${PREFIX}/bin/tack ${PREFIX}/lib/tack ${PREFIX}/share/tack | ||
|
||
lib/markdownsharp/bin/Release/MarkdownSharp.dll: | ||
xbuild /property:Configuration=Release lib/markdownsharp/MarkdownSharp.csproj | ||
run: | ||
dotnet run tack.csproj | ||
|
||
ext/nustache/Nustache.Core/Nustache.Core.csproj: | ||
git submodule init | ||
git submodule update | ||
build-mac: | ||
dotnet publish -c Release -r osx-x64 | ||
|
||
ext/nustache/Nustache.Core/bin/Release/Nustache.Core.dll: ext/nustache/Nustache.Core/Nustache.Core.csproj | ||
xbuild /property:Configuration=Release ext/nustache/Nustache.Core/Nustache.Core.csproj | ||
install-mac: build-mac | ||
install -d ${PREFIX}/lib/tack | ||
install bin/Release/netcoreapp2.2/osx-x64/publish/* ${PREFIX}/lib/tack | ||
install tack.sh ${PREFIX}/bin/tack | ||
chmod a+rx ${PREFIX}/bin/tack | ||
|
||
install: bin/Release/tack.exe | ||
install -d ${PREFIX}/share/tack | ||
install bin/Release/* ${PREFIX}/share/tack | ||
printf '#!/bin/sh\nmono '${PREFIX}'/share/tack/tack.exe $$@\n' > ${PREFIX}/bin/tack | ||
package-mac: build-mac | ||
rm -rf tmp | ||
install -d tmp/lib/tack tmp/bin | ||
install bin/Release/netcoreapp2.2/osx-x64/publish/* tmp/lib/tack | ||
install tack.sh tmp/bin/tack | ||
chmod a+rx tmp/bin/tack | ||
tar -C tmp -czvf tack_${VERSION}_osx-x64.tgz bin lib | ||
rm -rf tmp | ||
|
||
build-linux: | ||
dotnet publish -c Release -r linux-x64 | ||
|
||
install-linux: build-linux | ||
install -d ${PREFIX}/lib/tack | ||
install bin/Release/netcoreapp2.2/linux-x64/publish/* ${PREFIX}/lib/tack | ||
install tack.sh ${PREFIX}/bin/tack | ||
chmod a+rx ${PREFIX}/bin/tack | ||
|
||
uninstall: | ||
rm -rf ${PREFIX}/bin/tack ${PREFIX}/share/tack | ||
package-linux: build-linux | ||
rm -rf tmp | ||
install -d tmp/lib/tack tmp/bin | ||
install bin/Release/netcoreapp2.2/linux-x64/publish/* tmp/lib/tack | ||
install tack.sh tmp/bin/tack | ||
chmod a+rx tmp/bin/tack | ||
tar -C tmp -czvf tack_${VERSION}_linux-x64.tgz bin lib | ||
rm -rf tmp | ||
|
||
clean: | ||
rm -rf bin/ obj/ ext/nustache/bin/ ext/nustache/obj/ lib/markdownsharp/obj/ lib/markdownsharp/bin/ | ||
rm -rf bin/ obj/ | ||
|
||
.PHONY: uninstall | ||
.PHONY: uninstall build-mac install-mac run build-linux install-linux package-linux package-mac clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
DIRNAME=`dirname $0` | ||
PREFIX=`cd $DIRNAME && pwd` | ||
|
||
$PREFIX/../lib/tack/tack $@ |