Skip to content

Commit

Permalink
Update license automation
Browse files Browse the repository at this point in the history
Update automation scripts for adding license headers to files. Also shortens
the length of the headers to take up less lines in each file.

Moving forward, when you add new files, simply run `make headers` before
submitting your pull request. You can also manually run
`DRY_RUN=1 ./hack/headers-write` from the root of the repo to get a list of the
changes that `make headers` is going to perform
  • Loading branch information
bpmooch committed Aug 6, 2024
1 parent 045659d commit 700773d
Show file tree
Hide file tree
Showing 206 changed files with 2,034 additions and 1,989 deletions.
14 changes: 14 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
# ---------------------------------------------------------------------------- #
# | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | #
# | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | #
# | ███████║██║ ██║██████╔╝███████║█████╗ | #
# | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | #
# | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | #
# | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | #
# +--------------------------------------------+ #
# #
# Distributed Systems Runtime #
# ---------------------------------------------------------------------------- #
# Copyright 2022 - 2024, the aurae contributors #
# SPDX-License-Identifier: Apache-2.0 #
# ---------------------------------------------------------------------------- #
[build]
rustflags = "--cfg tokio_unstable"
19 changes: 2 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# ---------------------------------------------------------------------------- #
# Apache 2.0 License Copyright © 2022-2023 The Aurae Authors #
# #
# +--------------------------------------------+ #
# | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | #
# | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | #
# | ███████║██║ ██║██████╔╝███████║█████╗ | #
Expand All @@ -11,21 +8,9 @@
# +--------------------------------------------+ #
# #
# Distributed Systems Runtime #
# #
# ---------------------------------------------------------------------------- #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
# #
# Copyright 2022 - 2024, the aurae contributors #
# SPDX-License-Identifier: Apache-2.0 #
# ---------------------------------------------------------------------------- #

[workspace]
Expand Down
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -444,15 +444,11 @@ tlsinfo: ## Show TLS Info for /var/run/aurae*
fmt: headers ## Format the entire code base(s)
./hack/code-format

# writes license headers to files that are missing them. from the root of the
# repo, you can run `DRY_RUN=1 ./hack/headers-write` manually in case you are
# unsure what the script is going to do
.PHONY: headers
headers: headers-write ## Fix headers. Run this if you want to clobber things.

.PHONY: headers-check
headers-check: ## Only check for problematic files.
./hack/headers-check

.PHONY: headers-write
headers-write: ## Fix any problematic files blindly.
headers:
./hack/headers-write

.PHONY: check-deps
Expand Down
14 changes: 14 additions & 0 deletions aer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# ---------------------------------------------------------------------------- #
# | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | #
# | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | #
# | ███████║██║ ██║██████╔╝███████║█████╗ | #
# | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | #
# | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | #
# | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | #
# +--------------------------------------------+ #
# #
# Distributed Systems Runtime #
# ---------------------------------------------------------------------------- #
# Copyright 2022 - 2024, the aurae contributors #
# SPDX-License-Identifier: Apache-2.0 #
# ---------------------------------------------------------------------------- #
[package]
name = "aer"
version = "0.0.0"
Expand Down
16 changes: 15 additions & 1 deletion aer/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# ---------------------------------------------------------------------------- #
# | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | #
# | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | #
# | ███████║██║ ██║██████╔╝███████║█████╗ | #
# | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | #
# | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | #
# | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | #
# +--------------------------------------------+ #
# #
# Distributed Systems Runtime #
# ---------------------------------------------------------------------------- #
# Copyright 2022 - 2024, the aurae contributors #
# SPDX-License-Identifier: Apache-2.0 #
# ---------------------------------------------------------------------------- #
[package]
name = "aer-macros"
version = "0.0.0"
Expand All @@ -17,4 +31,4 @@ protobuf = { workspace = true }
protobuf-parse = { workspace = true }
proto-reader = { path = "../../crates/proto-reader" } # using workspace isn't working
quote = { workspace = true }
syn = { workspace = true }
syn = { workspace = true }
21 changes: 3 additions & 18 deletions aer/macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/* -------------------------------------------------------------------------- *\
* Apache 2.0 License Copyright © 2022-2023 The Aurae Authors *
* *
* +--------------------------------------------+ *
* | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | *
* | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | *
* | ███████║██║ ██║██████╔╝███████║█████╗ | *
Expand All @@ -11,21 +8,9 @@
* +--------------------------------------------+ *
* *
* Distributed Systems Runtime *
* *
* -------------------------------------------------------------------------- *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
* *
* Copyright 2022 - 2024, the aurae contributors *
* SPDX-License-Identifier: Apache-2.0 *
\* -------------------------------------------------------------------------- */

// The project prefers .expect("reason") instead of .unwrap() so we fail
Expand Down Expand Up @@ -63,4 +48,4 @@ pub fn subcommand(input: TokenStream) -> TokenStream {
#[proc_macro]
pub fn subcommand_for_dev_only(input: TokenStream) -> TokenStream {
subcommand::subcommand(input, false)
}
}
16 changes: 15 additions & 1 deletion aer/macros/src/subcommand.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/* -------------------------------------------------------------------------- *\
* | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | *
* | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | *
* | ███████║██║ ██║██████╔╝███████║█████╗ | *
* | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | *
* | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | *
* | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | *
* +--------------------------------------------+ *
* *
* Distributed Systems Runtime *
* -------------------------------------------------------------------------- *
* Copyright 2022 - 2024, the aurae contributors *
* SPDX-License-Identifier: Apache-2.0 *
\* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- *\
* Apache 2.0 License Copyright © 2022-2023 The Aurae Authors *
* *
Expand Down Expand Up @@ -603,4 +617,4 @@ fn write_mapping(

mapping.push_str("};");
mapping
}
}
16 changes: 15 additions & 1 deletion aer/src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/* -------------------------------------------------------------------------- *\
* | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | *
* | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | *
* | ███████║██║ ██║██████╔╝███████║█████╗ | *
* | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | *
* | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | *
* | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | *
* +--------------------------------------------+ *
* *
* Distributed Systems Runtime *
* -------------------------------------------------------------------------- *
* Copyright 2022 - 2024, the aurae contributors *
* SPDX-License-Identifier: Apache-2.0 *
\* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- *\
* Apache 2.0 License Copyright © 2022-2023 The Aurae Authors *
* *
Expand Down Expand Up @@ -77,4 +91,4 @@ async fn main() {
} {
eprintln!("{e:#?}");
}
}
}
16 changes: 15 additions & 1 deletion aer/src/cri/image_service.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/* -------------------------------------------------------------------------- *\
* | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | *
* | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | *
* | ███████║██║ ██║██████╔╝███████║█████╗ | *
* | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | *
* | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | *
* | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | *
* +--------------------------------------------+ *
* *
* Distributed Systems Runtime *
* -------------------------------------------------------------------------- *
* Copyright 2022 - 2024, the aurae contributors *
* SPDX-License-Identifier: Apache-2.0 *
\* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- *\
* Apache 2.0 License Copyright © 2022-2023 The Aurae Authors *
* *
Expand Down Expand Up @@ -37,4 +51,4 @@
// "../api/kubernetes/cri/v1/release-1.26.proto",
// kubernetes::cri,
// ImageService,
// );
// );
16 changes: 15 additions & 1 deletion aer/src/cri/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/* -------------------------------------------------------------------------- *\
* | █████╗ ██╗ ██╗██████╗ █████╗ ███████╗ | *
* | ██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝ | *
* | ███████║██║ ██║██████╔╝███████║█████╗ | *
* | ██╔══██║██║ ██║██╔══██╗██╔══██║██╔══╝ | *
* | ██║ ██║╚██████╔╝██║ ██║██║ ██║███████╗ | *
* | ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ | *
* +--------------------------------------------+ *
* *
* Distributed Systems Runtime *
* -------------------------------------------------------------------------- *
* Copyright 2022 - 2024, the aurae contributors *
* SPDX-License-Identifier: Apache-2.0 *
\* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- *\
* Apache 2.0 License Copyright © 2022-2023 The Aurae Authors *
* *
Expand Down Expand Up @@ -29,4 +43,4 @@
\* -------------------------------------------------------------------------- */

pub mod image_service;
pub mod pod_service;
pub mod pod_service;
Loading

0 comments on commit 700773d

Please sign in to comment.