diff --git a/Package.swift b/Package.swift index 59f47b0..59f8429 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,7 @@ import PackageDescription import Foundation -let years = 2017...2023 +let years = 2017...2024 var package = Package( name: "Advent of Code", diff --git a/Sources/AdventOfCode/AdventOfCode.swift b/Sources/AdventOfCode/AdventOfCode.swift index 9cd4639..1c7c514 100644 --- a/Sources/AdventOfCode/AdventOfCode.swift +++ b/Sources/AdventOfCode/AdventOfCode.swift @@ -6,6 +6,7 @@ import AdventOfCode2020 import AdventOfCode2021 import AdventOfCode2022 import AdventOfCode2023 + import AdventOfCode2024 // {YEARS IMPORT} @_exported import Utilities @@ -19,6 +20,7 @@ public struct AdventOfCode { AdventOfCode2021(), AdventOfCode2022(), AdventOfCode2023(), + AdventOfCode2024(), // {YEARS} ] diff --git a/Sources/AdventOfCode2024/AdventOfCode2024.swift b/Sources/AdventOfCode2024/AdventOfCode2024.swift new file mode 100644 index 0000000..74fb07d --- /dev/null +++ b/Sources/AdventOfCode2024/AdventOfCode2024.swift @@ -0,0 +1,9 @@ +import Utilities + +public struct AdventOfCode2024: Year { + public let days: [any Day] = [ + // {DAYS} + ] + + public init() {} +} diff --git a/scripts/add_day.sh b/scripts/add_day.sh index f8e3811..30dddc7 100755 --- a/scripts/add_day.sh +++ b/scripts/add_day.sh @@ -21,6 +21,11 @@ done shift $((OPTIND-1)) day_number=$1 +if [ -z "$day_number" ]; then + echo "Missing d number" + exit 1 +fi + day_name="Day${day_number}" year_number=$2 diff --git a/scripts/add_year.sh b/scripts/add_year.sh index 716cd70..aa4d2bc 100755 --- a/scripts/add_year.sh +++ b/scripts/add_year.sh @@ -3,6 +3,10 @@ set -e year_number=$1 +if [ -z "$year_number" ]; then + echo "Missing year number" + exit 1 +fi year_name="AdventOfCode${year_number}" year_folder_path="Sources/$year_name"