-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
25 lines (21 loc) · 1.09 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# https://github.com/casey/just
# Print generated types and their constants.
print-types:
dotnet run --nologo --verbosity=quiet --project examples/Podimo.ExampleConsoleApp
# Print generated code.
print-code:
dotnet run --nologo --verbosity=quiet --project examples/Podimo.ExampleCodeGeneration
# Run the tests.
test:
dotnet test --nologo --verbosity=quiet
# List the contents of the generated nupkg. N.B.: Requires bash.
inspect:
#!/usr/bin/env bash
set -euo pipefail
my_tmp_dir=$(mktemp -d 2>/dev/null || mktemp -d -t 'my_tmp_dir') # 1. Create temporary directory
dotnet pack --nologo --verbosity=quiet --output "${my_tmp_dir}" # 2. Put packages into directory
for x in "${my_tmp_dir}"/*.nupkg; do # 3. Iterate through all packages
mv -- "$x" "$x.zip" # 4. Set zip extension on packages
unzip -l "$x.zip" # 5. Use unzip to list the files
done
rm -rf "${my_tmp_dir}" # 6. Remove the directory