Skip to content

Commit

Permalink
Fix the license headers (#1518)
Browse files Browse the repository at this point in the history
* Fix license header check script

* Add license text to some headers
  • Loading branch information
jackkleeman committed May 15, 2024
1 parent 210c0e9 commit c930d41
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 3 deletions.
10 changes: 10 additions & 0 deletions cli/src/commands/state/util.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH.
// All rights reserved.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use crate::cli_env::CliEnv;
use crate::clients::{MetaClientInterface, MetasClient};
use crate::ui::console::StyledTable;
Expand Down
1 change: 1 addition & 0 deletions cli/src/ui/output.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH.
// All rights reserved.
//
// Use of this software is governed by the Business Source License
Expand Down
3 changes: 2 additions & 1 deletion crates/benchmarks/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![allow(clippy::async_yields_async)]
// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH.
// All rights reserved.
//
Expand All @@ -9,6 +8,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

#![allow(clippy::async_yields_async)]

//! Utilities for benchmarking the Restate runtime
use std::num::NonZeroU64;
use std::time::Duration;
Expand Down
10 changes: 10 additions & 0 deletions crates/service-client/src/request_identity/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH.
// All rights reserved.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use hyper::header::HeaderName;

use hyper::HeaderMap;
Expand Down
10 changes: 10 additions & 0 deletions crates/service-client/src/request_identity/v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH.
// All rights reserved.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use std::fmt;
use std::fmt::{Debug, Formatter};
use std::path::PathBuf;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH.
// All rights reserved.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use super::*;

use bytestring::ByteString;
Expand Down
5 changes: 3 additions & 2 deletions tools/scripts/check-license-headers
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
exit_code=0
for file in $(find src -name "*.rs"); do
if ! head -9 "$file" | tr -d '\n' | grep -q '^// Copyright (c) [0-9]\{4\}\(-[0-9]\{4\}\)\? - Restate Software, Inc., Restate GmbH.// All rights reserved.//// Use of this software is governed by the Business Source License// included in the LICENSE file.//// As of the Change Date specified in that file, in accordance with// the Business Source License, use of this software will be governed// by the Apache License, Version 2.0.$'; then
files=$(find crates cli server -name "*.rs") || exit 1
for file in ${files}; do
if ! head -9 "$file" | tr -d '\n' | grep -q '^// Copyright (c) [0-9]\{4\}\(-[0-9]\{4\}\)\? - \+Restate Software, Inc., Restate GmbH.// All rights reserved.//// Use of this software is governed by the Business Source License// included in the LICENSE file.//// As of the Change Date specified in that file, in accordance with// the Business Source License, use of this software will be governed// by the Apache License, Version 2.0.$'; then
echo "$file does not contain valid license header"
exit_code=1
fi
Expand Down

0 comments on commit c930d41

Please sign in to comment.