Skip to content

Commit

Permalink
Merge pull request #6 from codecrafters-io/change-starter-structure
Browse files Browse the repository at this point in the history
change starter structure
  • Loading branch information
rohitpaulk authored Jul 11, 2024
2 parents eedcb13 + 88f45b8 commit 56cc0f7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 58 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/go-1.19.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ WORKDIR /app

COPY go.mod go.sum ./

RUN go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs -r go get
RUN ash -c "set -exo pipefail; go mod graph | awk '{if (\$1 !~ \"@\") {print \$2}}' | xargs -r go get"

2 changes: 1 addition & 1 deletion dockerfiles/python-3.11.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.11-alpine

RUN pip install pipenv
RUN pip install --no-cache-dir pipenv==2024.0.1

COPY Pipfile /app/Pipfile
COPY Pipfile.lock /app/Pipfile.lock
Expand Down
53 changes: 1 addition & 52 deletions starter-repository-definitions.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,12 @@
- language: python
file_mappings:
- source: starter_templates/README.md
target: README.md
- source: starter_templates/codecrafters.yml
target: codecrafters.yml
- source: starter_templates/python/app/main.py
target: app/main.py
- source: starter_templates/python/Pipfile
target: Pipfile
- source: starter_templates/python/Pipfile.lock
target: Pipfile.lock
- source: starter_templates/python/.gitignore
target: .gitignore
- source: starter_templates/python/your_grep.sh
target: your_grep.sh
- source: starter_templates/.gitattributes
target: .gitattributes
template_attributes:
required_executable: "python (3.11)"
user_editable_file: "app/main.py"

- language: rust
file_mappings:
- source: starter_templates/README.md
target: README.md
- source: starter_templates/codecrafters.yml
target: codecrafters.yml
- source: starter_templates/rust/src/main.rs
target: src/main.rs
- source: starter_templates/rust/.gitignore
target: .gitignore
- source: starter_templates/rust/Cargo.toml
target: Cargo.toml
- source: starter_templates/rust/Cargo.lock
target: Cargo.lock
- source: starter_templates/rust/your_grep.sh
target: your_grep.sh
- source: starter_templates/.gitattributes
target: .gitattributes
template_attributes:
required_executable: "cargo (1.70)"
user_editable_file: "src/main.rs"

- language: go
file_mappings:
- source: starter_templates/README.md
target: README.md
- source: starter_templates/codecrafters.yml
target: codecrafters.yml
- source: starter_templates/go/your_grep.sh
target: your_grep.sh
- source: starter_templates/go/go.mod
target: go.mod
- source: starter_templates/go/go.sum
target: go.sum
- source: starter_templates/go/cmd/mygrep/main.go
target: cmd/mygrep/main.go
- source: starter_templates/.gitattributes
target: .gitattributes
template_attributes:
required_executable: "go (1.19)"
user_editable_file: "cmd/mygrep/main.go"
user_editable_file: "cmd/mygrep/main.go"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ This is a starting point for {{language_name}} solutions to the

_Add a description of your course here_

**Note**: If you're viewing this repo on GitHub, head over to [codecrafters.io](https://codecrafters.io) to try the challenge.
**Note**: If you're viewing this repo on GitHub, head over to
[codecrafters.io](https://codecrafters.io) to try the challenge.

# Passing the first stage

The entry point for your `<fill_in_executable_name>` implementation is in `{{ user_editable_file }}`. Study and uncomment the relevant code, and
push your changes to pass the first stage:
The entry point for your `<fill_in_executable_name>` implementation is in
`{{ user_editable_file }}`. Study and uncomment the relevant code, and push your
changes to pass the first stage:

``` sh
```sh
git add .
git commit -m "pass 1st stage" # any msg
git push origin master
Expand Down
File renamed without changes.

0 comments on commit 56cc0f7

Please sign in to comment.