This repository has been archived by the owner on Aug 28, 2022. It is now read-only.
-
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.
chore: Migrate from Make to Task (#50)
- Loading branch information
Showing
10 changed files
with
155 additions
and
160 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,9 +1,11 @@ | ||
/public/hot | ||
/public/storage | ||
/storage | ||
/vendor | ||
.env | ||
.phpunit.result.cache | ||
artifacts/ | ||
junit.xml | ||
docker-compose.override.yml | ||
/public/hot/** | ||
/public/storage/** | ||
/storage/** | ||
/vendor/** | ||
/.env | ||
/.phpunit.result.cache | ||
/artifacts/** | ||
/junit.xml | ||
/docker-compose.override.yml | ||
|
||
!/**/.gitkeep |
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,104 @@ | ||
version: '3' | ||
|
||
silent: true | ||
|
||
dotenv: ['.env', '.env.example'] | ||
|
||
tasks: | ||
default: | ||
cmds: | ||
- task --list | ||
start: | ||
desc: Start the local application environment | ||
cmds: | ||
- task: up | ||
- task: install | ||
- echo "Launched application at http://localhost:$APP_PORT" | ||
suspend: | ||
desc: Suspend the local application environment to maintain state for later | ||
cmds: | ||
- docker compose down | ||
stop: | ||
desc: Stop the local application environment and clean all state | ||
cmds: | ||
- docker compose down --volumes --rmi all --remove-orphans | ||
logs: | ||
desc: Stream local environment container output | ||
cmds: | ||
- docker compose logs -f | ||
shell: | ||
desc: Launch interactive shell for application container | ||
cmds: | ||
- task: exec | ||
vars: {COMMAND: 'sh'} | ||
check: | ||
desc: Run application checks (code quality, tests) | ||
cmds: | ||
- task: composer | ||
vars: {SCRIPT: "check"} | ||
test: | ||
desc: Run application tests | ||
cmds: | ||
- task: composer | ||
vars: {SCRIPT: "test"} | ||
install: | ||
desc: Install php dependencies | ||
cmds: | ||
- task: composer | ||
vars: {SCRIPT: "install"} | ||
release: | ||
desc: Tag new version of the application | ||
summary: | | ||
Tag a new version of the application against the current HEAD | ||
VERSION is a required parameter which should be an un-prefixed Semantic | ||
Version, e.g: 0.1.0. | ||
To overwrite an existing tag on the local and remote, pass through the | ||
`-f` flag to the underlying git command: | ||
VERSION=0.1.0 task release -- -f | ||
preconditions: | ||
- sh: test $VERSION | ||
msg: A VERSION parameter is required to create a new release | ||
vars: | ||
VERSION: '{{default "0.1.0" .VERSION}}' | ||
cmds: | ||
- git show --oneline -s | ||
- | | ||
git tag -sam ":tada: Version {{.VERSION}}" v{{.VERSION}} {{.CLI_ARGS}} | ||
- git push origin v{{.VERSION}} {{.CLI_ARGS}} | ||
up: | ||
summary: | | ||
Start local application environment | ||
note: This is a command fragment for Taskfile composition. | ||
cmds: | ||
- docker compose up -d | ||
composer: | ||
summary: | | ||
Run composer script on service | ||
note: This is a command fragment for Taskfile composition. | ||
vars: | ||
SCRIPT: '{{default "" .SCRIPT}}' | ||
cmds: | ||
- task: exec | ||
vars: {COMMAND: "composer {{.SCRIPT}}"} | ||
exec: | ||
summary: | | ||
Run arbitrary command on service | ||
TTY controls pseudo-tty allocation using for scripted execution of tasks. | ||
note: This is a command fragment for Taskfile composition. | ||
vars: | ||
SERVICE: '{{default "app" .SERVICE}}' | ||
COMMAND: '{{default "echo \"Hello, World!\"" .COMMAND}}' | ||
TTY: '{{default "true" .TTY}}' | ||
cmds: | ||
- task: up | ||
- | | ||
docker compose exec \ | ||
{{if ne .TTY "true"}}-T{{end}} \ | ||
{{.SERVICE}} {{.COMMAND}} |
Oops, something went wrong.