Skip to content

Commit 3101d28

Browse files
committed
Bump csharpier to v1.0.1
1 parent 882a0ec commit 3101d28

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

Dockerfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ RUN cargo build --release
3838
FROM alpine:3.21 AS csharpier-builder
3939
ARG DOTNET_PLATFORM="linux-musl-amd64"
4040
WORKDIR /app
41-
# csharpier defines .net9 in a file called global.json, so we need it on the system even if we don't use it
42-
RUN apk add --no-cache git dotnet9-sdk dotnet8-sdk
41+
RUN apk add --no-cache git dotnet9-sdk
42+
43+
# this is csharpier v1.0.1
4344
RUN git clone https://github.com/belav/csharpier /app && \
44-
git checkout f359fbda3dce613f8c69e4680d65727eefee9d16
45-
# we build using .net8
46-
RUN dotnet publish --framework net8.0 -o output \
45+
git checkout 488679295cf50e84e6cac15f308d7e5a362c245c
46+
47+
RUN dotnet publish --framework net9.0 -o output \
4748
-r ${DOTNET_PLATFORM} /p:StripSymbols=true \
4849
/p:InvariantGlobalization=true /p:SelfContained=true \
4950
/p:PublishSingleFile=true Src/CSharpier.Cli
5051

51-
5252
# build goimports
5353
FROM docker.io/golang:1.24-alpine AS goimports-builder
5454
RUN go install golang.org/x/tools/cmd/goimports@latest
@@ -106,7 +106,7 @@ COPY --from=goimports-builder /usr/local/go/ /usr/local/go/
106106
COPY --from=goimports-builder /go/bin/goimports /usr/bin
107107

108108
# C#
109-
COPY --from=csharpier-builder /app/output/dotnet-csharpier /usr/bin/
109+
COPY --from=csharpier-builder /app/output/CSharpier /usr/bin/csharpier
110110

111111
# Rust
112112
# All of this craziness reduces the image size by about 600Mb

src/postprocessing.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,15 @@ impl PostprocessorLanguage {
106106
// https://github.com/facebook/ktfmt
107107
Self::Kotlin => &[("ktfmt", &["--kotlinlang-style"])],
108108
// https://github.com/belav/csharpier
109-
Self::CSharp => &[("dotnet-csharpier", &["--fast", "--no-msbuild-check"])],
109+
Self::CSharp => &[(
110+
"csharpier",
111+
&[
112+
"format",
113+
"--no-cache",
114+
"--skip-validation",
115+
"--no-msbuild-check",
116+
],
117+
)],
110118
// https://github.com/google/google-java-format
111119
Self::Java => &[("google-java-format", &["-i", "-a"])],
112120
// https://github.com/biomejs/biome

0 commit comments

Comments
 (0)