Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Rename handle-task-event to setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed Jan 22, 2024
1 parent c21c346 commit 9205554
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion assets/copy_demo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ _subdirectory: "project"
_tasks:
- >-
set -eE
&& (HANDLER_PREVIEW=$(cat "./handle-task-event"))
&& (./handle-task-event --run
&& (HANDLER_PREVIEW=$(cat "./setup"))
&& (./setup --run
|| (
HANDLER_PREVIEW_FILE="/tmp/skeleton-handler-preview-$(uuidgen)"
&& echo "$HANDLER_PREVIEW" > "$HANDLER_PREVIEW_FILE"
Expand Down
2 changes: 1 addition & 1 deletion project/scripts/skeleton.{{sref}}.bash.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# shellcheck disable=SC2005,SC1091

set -eEuo pipefail
source handle-task-event
source setup

update_setup() {
export LAST_REF="{{sref}}"
Expand Down
2 changes: 1 addition & 1 deletion project/handle-task-event.jinja → project/setup.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#% include "handle-task-event.bash" %#
#% include "setup.bash" %#

if test "${1:-}" = "--run"
then
Expand Down
6 changes: 3 additions & 3 deletions handle-task-event.bash → setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ after_copy() {
echo
setup_poetry_virtualenv
run_copier_hook
silent rm -f ./handle-task-event
silent rm -f ./setup
#% if not ctt %#
if test "$(git rev-parse --show-toplevel 2> /dev/null)" != "$(pwd)"
then
Expand Down Expand Up @@ -207,7 +207,7 @@ handle_task_event() {
}
#%- endif %#
#%- if upgrade_script %#
# Automatically copied from {{skeleton_url}}/tree/{{sref}}/handle-task-event.sh
# Automatically copied from {{skeleton_url}}/tree/{{sref}}/setup.sh
#%- endif %#
# Comms
BOLD="\033[1m"
Expand Down Expand Up @@ -362,7 +362,7 @@ after_update_algorithm() {
poetry lock
note "Committing changes..."
silent git add .
silent git rm -f ./handle-task-event
silent git rm -f ./setup
if test "$LAST_REF" = "$NEW_REF"
then
info "The version of the skeleton has not changed."
Expand Down

0 comments on commit 9205554

Please sign in to comment.