Skip to content

Commit 9ea44cc

Browse files
committed
Bump clang-format version to 10-13
1 parent eb7cd20 commit 9ea44cc

11 files changed

+15
-15
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "cpp-py-format"
3-
version = "0.2.3"
4-
authors = ["Andrew Gaspar <[email protected]>","Joshua Brown <[email protected]>"]
5-
edition = "2018"
3+
version = "0.3.0"
4+
authors = ["Andrew Gaspar <[email protected]>","Joshua Brown <[email protected]>", "Philipp Grete <[email protected]"]
5+
edition = "2022"
66

77
[dependencies]
88
glob = "0.3.0"

Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ COPY src ./src
77
RUN cargo install --path .
88

99
# GitHub Action Image
10-
FROM ubuntu:18.04
10+
FROM ubuntu:20.04
1111
# Install our apt packages
1212
RUN apt-get update
1313
RUN apt-get upgrade -y
14-
RUN apt-get install -y git
15-
RUN apt-get install -y python3-pip
14+
RUN apt-get install -y git \
15+
python3-pip \
16+
clang-format-10 clang-format-11 clang-format-12 clang-format-13 \
17+
&& rm -rf /var/lib/apt/lists/*
1618
RUN python3 -m pip install --upgrade pip
1719
RUN python3 -m pip install black
1820

19-
# Install clang-formats
20-
ADD ./clang-format /clang-format
2121
COPY --from=builder /usr/local/cargo/bin/cpp-py-format /cpp-py-format
2222
ENTRYPOINT [ "/cpp-py-format" ]

check/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ inputs:
99
required: true
1010
clangFormatVersion:
1111
description:
12-
Major Clang Version number. Supports clang 5 to 10. Default 10
12+
Major Clang Version number. Supports clang 10 to 13. Default 13
1313
required: false
14-
default: '10'
14+
default: '13'
1515
include_c:
1616
description:
1717
Comma-separated list of file globs (e.g '**/*.cpp,**/*.hpp') that

clang-format/clang-format-10

-2.16 MB
Binary file not shown.

clang-format/clang-format-5

-1.8 MB
Binary file not shown.

clang-format/clang-format-6

-1.91 MB
Binary file not shown.

clang-format/clang-format-7

-1.96 MB
Binary file not shown.

clang-format/clang-format-8

-2.01 MB
Binary file not shown.

clang-format/clang-format-9

-2.09 MB
Binary file not shown.

command/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ inputs:
99
required: true
1010
clangFormatVersion:
1111
description:
12-
Major Clang Version number. Supports clang 5 to 10. Default 10
12+
Major Clang Version number. Supports clang 10 to 13. Default 13
1313
required: false
14-
default: '10'
14+
default: '13'
1515
include_c:
1616
description:
1717
Comma-separated list of file globs (e.g '**/*.cpp,**/*.hpp') that

src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct App {
4141
impl App {
4242
fn run() -> Result<(), Box<dyn Error>> {
4343
let matches = clap::App::new("cpp-py-format")
44-
.author("Andrew Gaspar <[email protected]>, Joshua Brown <[email protected]")
44+
.author("Andrew Gaspar <[email protected]>, Joshua Brown <[email protected], Philipp Grete <[email protected]>")
4545
.about("Runner code for executing clang-format, and black")
4646
.arg(
4747
Arg::with_name("github-token")
@@ -53,7 +53,7 @@ impl App {
5353
Arg::with_name("clang-format-version")
5454
.long("clang-format-version")
5555
.takes_value(true)
56-
.default_value("10")
56+
.default_value("13")
5757
.conflicts_with("clang-format-override"),
5858
)
5959
.arg(
@@ -106,7 +106,7 @@ impl App {
106106
if let Some(clang_format_override) = matches.value_of("clang-format-override") {
107107
clang_format_override.into()
108108
} else if env::var("GITHUB_ACTION").is_ok() {
109-
format!("/clang-format/clang-format-{}", clang_format_version).into()
109+
format!("/usr/bin/clang-format-{}", clang_format_version).into()
110110
} else {
111111
String::from_utf8(
112112
Command::new("which")

0 commit comments

Comments
 (0)