remove scaffold.sh

add scaffold aoc template
This commit is contained in:
2024-12-27 22:13:33 +00:00
parent 51fed356af
commit 88f082080d
13 changed files with 266 additions and 194 deletions

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
cd "{{ .Project }}" || exit 1
go mod init github.com/onyx-and-iris/aoc{{ .Scaffold.year }}/"{{ .Project }}"
go mod tidy
# shellcheck disable=SC2001
day=$(echo "{{ .Project }}" | sed 's/^day-0*//')
mkdir -p testdata
curl "https://adventofcode.com/{{ .Scaffold.year }}/day/$day/input" -H "Cookie: session=$AOC_SESSION" > testdata/input.txt
mkdir -p cmd/cli/testdata && ln testdata/input.txt cmd/cli/testdata/input.txt
mkdir -p internal/one/testdata && ln testdata/input.txt internal/one/testdata/input.txt
mkdir -p internal/two/testdata && ln testdata/input.txt internal/two/testdata/input.txt