Skip to content

Commit

Permalink
Setup 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
CraigSiemens committed Dec 1, 2024
1 parent 178c76f commit e65aadb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import PackageDescription
import Foundation

let years = 2017...2023
let years = 2017...2024

var package = Package(
name: "Advent of Code",
Expand Down
2 changes: 2 additions & 0 deletions Sources/AdventOfCode/AdventOfCode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import AdventOfCode2020
import AdventOfCode2021
import AdventOfCode2022
import AdventOfCode2023
import AdventOfCode2024
// {YEARS IMPORT}

@_exported import Utilities
Expand All @@ -19,6 +20,7 @@ public struct AdventOfCode {
AdventOfCode2021(),
AdventOfCode2022(),
AdventOfCode2023(),
AdventOfCode2024(),
// {YEARS}
]

Expand Down
9 changes: 9 additions & 0 deletions Sources/AdventOfCode2024/AdventOfCode2024.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Utilities

public struct AdventOfCode2024: Year {
public let days: [any Day] = [
// {DAYS}
]

public init() {}
}
5 changes: 5 additions & 0 deletions scripts/add_day.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions scripts/add_year.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e65aadb

Please sign in to comment.