Skip to content

Commit

Permalink
Add Taskfile with build command
Browse files Browse the repository at this point in the history
Adjust README accordingly
  • Loading branch information
foosel committed Feb 13, 2023
1 parent 5d766f6 commit 2110277
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
workspace
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ A bunch of simple update scripts are run via [CustoPiZer](https://github.com/Oct
* `80-install-user-fix`: Installs a compatibility layer to support renaming the `pi` user, if needed.
* `99-write-build`: Writes the build tag to `/etc/octopiuptodate-build`

## How do I run this?

There's a [Taskfile](https://taskfile.dev) in this repository that you can use to run the update scripts locally.

- Install [Taskfile](https://taskfile.dev/installation/)
- Install [Docker]()
- Create a `workspace` directory and place your `input.img` in that
- Run `task build`

Alternatively, you can also manually run `docker`:

```
docker run --rm --privileged -v $(pwd)/workspace:/CustoPiZer/workspace $(pwd)/scripts:/CustoPiZer/workspace/scripts ghcr.io/octoprint/custopizer:latest
```

## Can I do something like this as well?

Sure, check out [CustoPiZer's README](https://github.com/OctoPrint/CustoPiZer) for
Expand Down
10 changes: 10 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"

tasks:
build:
cmds:
- |
{{if eq OS "windows"}}powershell {{end}}docker run --rm --privileged -v {{.USER_WORKING_DIR | toSlash}}/workspace:/CustoPiZer/workspace -v {{.USER_WORKING_DIR | toSlash}}/scripts:/CustoPiZer/workspace/scripts ghcr.io/octoprint/custopizer:latest
preconditions:
- test -d workspace
- test -f workspace/input.img

0 comments on commit 2110277

Please sign in to comment.