-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sync command part of the puzzles cmd
Signed-off-by: Rodolfo Sanchez <[email protected]>
- Loading branch information
Showing
9 changed files
with
127 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
dist/ | ||
coverage* | ||
.env | ||
aoctl | ||
/aoctl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
Copyright © 2024 NAME HERE <EMAIL ADDRESS> | ||
*/ | ||
package aoctl | ||
|
||
import ( | ||
"github.com/dolfolife/aoctl/pkg/aoc" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// syncronizeCmd represents the syncronize command | ||
var ( | ||
forced = false | ||
synchronizeCmd = &cobra.Command{ | ||
Use: "synchronize", | ||
Short: "Synchronize current project", | ||
Long: `Synchronize allows you to update the local repository with the tree of problems in | ||
adventofcode.com.`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
aoc.SyncAoC(forced) | ||
}, | ||
} | ||
) | ||
|
||
func init() { | ||
puzzlesCmd.AddCommand(synchronizeCmd) | ||
|
||
synchronizeCmd.Flags().BoolVarP(&forced, "force", "f", false, "to force the files update") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
# Advent of Code Solutions | ||
|
||
This project will help you organize your solutions for Advent of Code so you can learn, improve, and share it with others. | ||
|
||
To start building solutions you can sync your project with your account on Advent of Code with | ||
|
||
```bash | ||
aoctl puzzles sync | ||
``` | ||
|
||
to learn more about `sync` refer to the documentation at [sync](https://github.com/dolfolife/aoctl) |