Skip to content

Commit

Permalink
rename adventofcode to aoctl
Browse files Browse the repository at this point in the history
Signed-off-by: Rodolfo Sanchez <rodolfo2488@gmail.com>
  • Loading branch information
dolfolife committed Sep 18, 2023
1 parent dfb35d0 commit c91b3c0
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 29 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
tag=$(echo $(git describe --abbrev=0 --tags) | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.)
git tag $tag
git push --tags
- name: Release with GoReleaser
uses: goreleaser/goreleaser-action@v5
Expand Down
42 changes: 29 additions & 13 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@ before:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- env:
- binary: aoctl
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

goarch:
- "386"
- "amd64"
- "arm"
- "arm64"
project_name: aoctl
release:
github:
owner: dolfolife
name: aoctl
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
Expand All @@ -37,20 +47,28 @@ changelog:
- '^docs:'
- '^test:'
- '^examples:'

# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
dockers:
- goos: linux
goarch: "386"
ids: ['aoctl']
dockerfile: Dockerfile
image_templates:
- "ghcr.io/dolfolife/aoctl:{{ .tag }}"
- "ghcr.io/dolfolife/aoctl:v{{ .major }}"
- "ghcr.io/dolfolife/aoctl:v{{ .major }}.{{ .minor }}"
- "ghcr.io/dolfolife/aoctl:latest"
brews:
- name: aoctl
url_template: "https://github.com/dolfolife/adventofcode/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
tap:
owner: dolfolife
name: oactl
url_template: "https://github.com/dolfolife/aoctl/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
commit_author:
name: dolfolife
email: rodolfo2488@gmail.com
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
folder: Formula
homepage: https://github.com/dolfolife/adventofcode
homepage: https://github.com/dolfolife/aoctl
description: "Advent of Code CLI to help you organize and test your solutions"
license: MIT
dependencies:
Expand All @@ -60,7 +78,5 @@ brews:
repository:
owner: dolfolife
name: adventofcode
branch: main
pull_request:
enabled: true
draft: true
branch: "{{ .Env.VERSION }}"

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ I found [Advent Of Code Go](https://github.com/alexchao26/advent-of-code-go/tree

## Pre-requisite

You need your session ID from the Advent of Code website. I opened [Session ID is a manual process](https://github.com/dolfolife/adventofcode/issues/1) issue.
You need your session ID from the Advent of Code website. I opened [Session ID is a manual process](https://github.com/dolfolife/aoctl/issues/1) issue.

## Puzzles

Expand Down
2 changes: 1 addition & 1 deletion cmd/aoc/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package aoc
import (

"github.com/spf13/cobra"
"github.com/dolfolife/adventofcode/pkg/aoc"
"github.com/dolfolife/aoctl/pkg/aoc"
)

var initCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/aoc/puzzle.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"github.com/spf13/cobra"
"github.com/dolfolife/adventofcode/pkg/aoc"
"github.com/dolfolife/aoctl/pkg/aoc"
)
var puzzleCmd = &cobra.Command{
Use: "puzzle",
Expand Down
4 changes: 2 additions & 2 deletions examples/golang/2016/01/puzzle_solver.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
"errors"

"github.com/dolfolife/adventofcode/pkg/puzzle"
. "github.com/dolfolife/adventofcode/pkg/math"
"github.com/dolfolife/aoctl/pkg/puzzle"
. "github.com/dolfolife/aoctl/pkg/math"
)


Expand Down
2 changes: 1 addition & 1 deletion examples/golang/2016/02/puzzle_solver.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"fmt"

"github.com/dolfolife/adventofcode/pkg/puzzle"
"github.com/dolfolife/aoctl/pkg/puzzle"
)

func solvePart1(commands []string) (string, error) {
Expand Down
4 changes: 2 additions & 2 deletions examples/golang/2016/03/puzzle_solver.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
"strings"

"github.com/dolfolife/adventofcode/pkg/math"
"github.com/dolfolife/adventofcode/pkg/puzzle"
"github.com/dolfolife/aoctl/pkg/math"
"github.com/dolfolife/aoctl/pkg/puzzle"
)

func solvePart1(input [][]int) (string, error) {
Expand Down
6 changes: 3 additions & 3 deletions examples/golang/2016/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/dolfolife/adventofcode/examples/golang/2016
module github.com/dolfolife/aoctl/examples/golang/2016

go 1.21.0

require (
github.com/dolfolife/adventofcode v0.0.0-20230829133931-d2eb61e5a257
github.com/dolfolife/aoctl v0.0.0-20230829133931-d2eb61e5a257
github.com/stretchr/testify v1.8.4
)

Expand All @@ -13,4 +13,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/dolfolife/adventofcode => ../../../.
replace github.com/dolfolife/aoctl => ../../../.
6 changes: 3 additions & 3 deletions examples/golang/2016/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"os"
"fmt"

day_1 "github.com/dolfolife/adventofcode/examples/golang/2016/01"
day_2 "github.com/dolfolife/adventofcode/examples/golang/2016/02"
day_3 "github.com/dolfolife/adventofcode/examples/golang/2016/03"
day_1 "github.com/dolfolife/aoctl/examples/golang/2016/01"
day_2 "github.com/dolfolife/aoctl/examples/golang/2016/02"
day_3 "github.com/dolfolife/aoctl/examples/golang/2016/03"
)

func RunDay1() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/dolfolife/adventofcode
module github.com/dolfolife/aoctl

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "github.com/dolfolife/adventofcode/cmd/aoc"
import "github.com/dolfolife/aoctl/cmd/aoc"

func main() {
aoc.Execute()
Expand Down

0 comments on commit c91b3c0

Please sign in to comment.