An open-source cross-platform alternative to AirDrop
ci: check copyright string
Tien Do Namd69d1a74f3ad
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex cd1ee7c5..52eba4c7 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -133,6 +133,34 @@ jobs:echo "Versions match."fi+ # Binaries must carry identical copyright strings (macOS conventionally uses+ # the © symbol, which is normalized for the comparison). License files use the+ # Apache boilerplate format ("Copyright 2022-2026 Tien Do Nam") and typed_isolates+ # has its own start year, so only their end year is compared.+ # The vendored cargokit LICENSE is third-party and deliberately not checked.+ - name: Compare copyright strings+ run: |+ APP_COPYRIGHT=$(grep -o 'Copyright (C) [^"]*' app/windows/runner/Runner.rc)+ CLI_COPYRIGHT=$(grep -o 'Copyright (C) [^"]*' cli/build.rs)+ MACOS_COPYRIGHT=$(sed -n 's/^PRODUCT_COPYRIGHT = //p' app/macos/Runner/Configs/AppInfo.xcconfig | sed 's/©/(C)/')+ APP_YEAR=$(echo "$APP_COPYRIGHT" | grep -o '[0-9]\{4\}' | tail -1)+ ROOT_LICENSE_YEAR=$(grep -o 'Copyright [0-9][0-9-]* Tien Do Nam' LICENSE | grep -o '[0-9]\{4\}' | tail -1)+ TYPED_LICENSE_YEAR=$(grep -o 'Copyright [0-9][0-9-]* Tien Do Nam' packages/typed_isolates/LICENSE | grep -o '[0-9]\{4\}' | tail -1)+ echo "App copyright is: $APP_COPYRIGHT"+ echo "CLI copyright is: $CLI_COPYRIGHT"+ echo "macOS copyright is: $MACOS_COPYRIGHT"+ echo "Root LICENSE end year is: $ROOT_LICENSE_YEAR"+ echo "typed_isolates LICENSE end year is: $TYPED_LICENSE_YEAR"+ if [ -z "$APP_COPYRIGHT" ] || [ "$APP_COPYRIGHT" != "$CLI_COPYRIGHT" ] || [ "$APP_COPYRIGHT" != "$MACOS_COPYRIGHT" ]; then+ echo "Copyright mismatch detected!"+ exit 1+ fi+ if [ -z "$APP_YEAR" ] || [ "$APP_YEAR" != "$ROOT_LICENSE_YEAR" ] || [ "$APP_YEAR" != "$TYPED_LICENSE_YEAR" ]; then+ echo "License copyright year mismatch detected!"+ exit 1+ fi+ echo "Copyright strings match."+- name: Compare Rust toolchain versionsrun: |ROOT_TOOLCHAIN=$(grep '^channel = ' rust-toolchain.toml | sed 's/channel = "//' | sed 's/"//')diff --git a/LICENSE b/LICENSEindex 832acf97..129b0901 100644--- a/LICENSE+++ b/LICENSE@@ -186,7 +186,7 @@same "printed page" as the copyright notice for easieridentification within third-party archives.- Copyright 2022-2024 Tien Do Nam+ Copyright 2022-2026 Tien Do NamLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.diff --git a/app/macos/Runner/Configs/AppInfo.xcconfig b/app/macos/Runner/Configs/AppInfo.xcconfigindex 071a798a..95730ebc 100644--- a/app/macos/Runner/Configs/AppInfo.xcconfig+++ b/app/macos/Runner/Configs/AppInfo.xcconfig@@ -11,4 +11,4 @@ PRODUCT_NAME = LocalSendPRODUCT_BUNDLE_IDENTIFIER = org.localsend.localsendApp// The copyright displayed in application information-PRODUCT_COPYRIGHT = Copyright © 2022 org.localsend. All rights reserved.+PRODUCT_COPYRIGHT = Copyright © 2022-2026 Tien Do Namdiff --git a/app/windows/runner/Runner.rc b/app/windows/runner/Runner.rcindex d9ccfa2d..9b7b663e 100644--- a/app/windows/runner/Runner.rc+++ b/app/windows/runner/Runner.rc@@ -93,7 +93,7 @@ BEGINVALUE "FileDescription", "LocalSend" "\0"VALUE "FileVersion", VERSION_AS_STRING "\0"VALUE "InternalName", "localsend_app" "\0"- VALUE "LegalCopyright", "Copyright (C) 2022-2024 Tien Do Nam. All rights reserved." "\0"+ VALUE "LegalCopyright", "Copyright (C) 2022-2026 Tien Do Nam" "\0"VALUE "OriginalFilename", "localsend_app.exe" "\0"VALUE "ProductName", "LocalSend" "\0"VALUE "ProductVersion", VERSION_AS_STRING "\0"diff --git a/cli/build.rs b/cli/build.rsindex 9104606b..ad431294 100644--- a/cli/build.rs+++ b/cli/build.rs@@ -8,7 +8,7 @@ fn main() {res.set("CompanyName", "Tien Do Nam");res.set("OriginalFilename", "localsend-cli.exe");res.set("InternalName", "localsend-cli");- res.set("LegalCopyright", "Copyright (C) 2022-2026 Tien Do Nam. All rights reserved.");+ res.set("LegalCopyright", "Copyright (C) 2022-2026 Tien Do Nam");// FileVersion/ProductVersion are derived from CARGO_PKG_VERSION automatically.res.compile().expect("failed to compile Windows resources");}