Skip to content

Commit

Permalink
feat: use pretzel as global tool
Browse files Browse the repository at this point in the history
  • Loading branch information
biohazard999 committed Oct 7, 2020
1 parent 3bba75f commit b7ef81f
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .config/dotnet-tools.json
Expand Up @@ -7,6 +7,12 @@
"commands": [
"minver"
]
},
"xenial.pretzel": {
"version": "0.8.3",
"commands": [
"pretzel"
]
}
}
}
27 changes: 27 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,27 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/build/bin/Debug/net5.0/build.dll",
"args": [],
"cwd": "${workspaceFolder}/build",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
2 changes: 1 addition & 1 deletion add-draft.cmd
@@ -1,2 +1,2 @@
if not exist src\content\_drafts mkdir src\content\_drafts
"C:\f\git\pretzel\src\Pretzel\bin\Debug\net5\Pretzel.exe" ingredient --drafts --s=src\content -n="%*"
dotnet pretzel ingredient --drafts --s=src\content -n="%*"
2 changes: 1 addition & 1 deletion add-post.cmd
@@ -1 +1 @@
"C:\f\git\pretzel\src\Pretzel\bin\Debug\net5\Pretzel.exe" ingredient --s=src\content -n="%*"
dotnet pretzel ingredient --s=src\content -n="%*"
3 changes: 1 addition & 2 deletions build/Program.cs
Expand Up @@ -20,7 +20,6 @@
var hash = new Lazy<Task<string>>(async () => (await ReadAsync("git", "rev-parse HEAD", noEcho: true)).Trim());

var NpmLocation = $@"{Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)}\nodejs\npm.cmd";
var pretzelLocation = @"C:\f\git\pretzel\src\Pretzel\bin\Release\net5\Pretzel.exe";
var blogDirectory = "src\\content";
var postsDirectory = Path.Combine(blogDirectory, "_posts");
var dataDirectory = Path.Combine(blogDirectory, "_data");
Expand Down Expand Up @@ -120,7 +119,7 @@
}
});

Target("build:blog", DependsOn("version", "comments"), () => RunAsync(pretzelLocation, $"bake {defaultArguments}"));
Target("build:blog", DependsOn("version", "comments"), () => RunToolAsync(() => RunAsync("dotnet", $"pretzel bake {defaultArguments}")));

Target("build", DependsOn("clean", "npm", "build:blog"));

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions src/content/_config.yml
Expand Up @@ -35,10 +35,9 @@ site-name: blog.delegate.at
feed-name: blog.delegate.at
site-url: https://blog.delegate.at
site-repo: https://www.github.com/xenial-io/Xenial.Blog
version: 0.0.0-alpha.0.334
commit: 6f97b1acd35b4189d8d900c92a31ab86f8f8fc53
last-update: 2020-10-05
version: 0.0.0-alpha.0.372
commit: 3bba75fb1171a224f672164310865ee8f86aa6b0
last-update: 2020-10-07
comment-repo: https://github.com/xenial-io/Xenial.Blog.Comments.git
comment-branch: main
comment-api: https://comments.xenial.io
#comment-api: https://localhost:5001
2 changes: 1 addition & 1 deletion taste-drafts.cmd
@@ -1 +1 @@
code . & "C:\f\git\pretzel\src\Pretzel\bin\Debug\net5\Pretzel.exe" taste -s=src\content -d=../../_site --drafts %*
code . & dotnet pretzel taste -s=src\content -d=../../_site --drafts %*
2 changes: 1 addition & 1 deletion taste.cmd
@@ -1 +1 @@
code . & "C:\f\git\pretzel\src\Pretzel\bin\Debug\net5\Pretzel.exe" taste -s=src\content -d=../../_site %*
code . & dotnet pretzel taste -s=src\content -d=../../_site %*

0 comments on commit b7ef81f

Please sign in to comment.