Skip to content

Commit

Permalink
use Info.plist preprocessor for copyright year
Browse files Browse the repository at this point in the history
Instead of manually modifying the `NSHumanReadableCopyright` key in every Info.plist, we make use of the Info.plist preprocessor.

Therefore, the current year has to be changed only in one place.

Project Settings -> Build Settings -> Info.plist Preprocessor Definitions

Signed-off-by: Toni Förster <toni.foerster@icloud.com>
  • Loading branch information
stonerl committed Feb 23, 2025
1 parent af83ae7 commit 23fdb26
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Debug Tools/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2010 - 2023 Ricky Romero</string>
<string>Copyright © 2010 - CURRENT_YEAR Ricky Romero
shutup.css © 2010 - CURRENT_YEAR Steven Frank and contributors</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
Expand Down
4 changes: 2 additions & 2 deletions Shut Up Core/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
</array>
</dict>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2023 Ricky Romero
shutup.css © 2010 - 2023 Steven Frank and contributors</string>
<string>Copyright © 2010 - CURRENT_YEAR Ricky Romero
shutup.css © 2010 - CURRENT_YEAR Steven Frank and contributors</string>
<key>NSHumanReadableDescription</key>
<string>Blocks comment sections on webpages.</string>
<key>TeamIdentifierPrefix</key>
Expand Down
3 changes: 1 addition & 2 deletions Shut Up Helper/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@
</dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2023 Ricky Romero
shutup.css © 2010 - 2023 Steven Frank and contributors</string>
<string>Copyright © 2010 - CURRENT_YEAR Ricky Romero</string>
<key>NSHumanReadableDescription</key>
<string>Enables Shut Up’s toolbar button and context menu item. Recommended for full functionality.</string>
<key>TeamIdentifierPrefix</key>
Expand Down
8 changes: 6 additions & 2 deletions Shut Up.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_PREPROCESS = YES;
INFOPLIST_PREPROCESSOR_DEFINITIONS = "CURRENT_YEAR=2025";
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13.6;
MACOSX_DEPLOYMENT_TARGET = 12.4;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -871,8 +873,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_PREPROCESS = YES;
INFOPLIST_PREPROCESSOR_DEFINITIONS = "CURRENT_YEAR=2025";
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13.6;
MACOSX_DEPLOYMENT_TARGET = 12.4;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
Expand Down
4 changes: 2 additions & 2 deletions Shut Up/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2023 Ricky Romero
shutup.css © 2010 - 2023 Steven Frank and contributors</string>
<string>Copyright © 2010 - CURRENT_YEAR Ricky Romero
shutup.css © 2010 - CURRENT_YEAR Steven Frank and contributors</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>
Expand Down

0 comments on commit 23fdb26

Please sign in to comment.