-
Notifications
You must be signed in to change notification settings - Fork 572
/
Copy pathjustfile
33 lines (25 loc) · 1.18 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
26
27
28
29
30
31
32
33
set quiet
import? '../sdk-codegen/utils.just'
_default:
just --list --unsorted
# base test command that other, more specific commands use
[no-quiet]
[no-exit-message]
_test no_build framework config:
dotnet test {{no_build}} {{framework}} src/StripeTests/StripeTests.csproj -c {{config}}
# ⭐ run tests in debug mode
test: (_test "" "-f net8.0" "Debug")
# skip build and don't specify the dotnet framework
ci-test: (_test "--no-build" "" "Release")
# ⭐ format all files
format *args:
# This sets TargetFramework because of a race condition in dotnet format when it tries to format to multiple targets at a time, which could lead to code with compiler errors after it completes
TargetFramework=net5.0 dotnet format src/Stripe.net/Stripe.net.csproj --severity warn {{args}}
# verify, but don't modify, the project's formatting
format-check: (format "--verify-no-changes")
# called by tooling
[private]
update-version version:
echo "{{ version }}" > VERSION
perl -pi -e 's|<Version>[.\-\d\w]+</Version>|<Version>{{ version }}</Version>|' src/Stripe.net/Stripe.net.csproj
perl -pi -e 's|Current = "[.\-\d\w]+";|Current = "{{ version }}";|' src/Stripe.net/Constants/Version.cs