Skip to content

Commit

Permalink
Use elegant-git for the binary file name
Browse files Browse the repository at this point in the history
The new binary name helps to differentiate between the new and old
binaries.
  • Loading branch information
extsoft committed Jan 26, 2025
1 parent e3670aa commit 5af646c
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ version
.stack-work/
dist-newstyle/
out/
.DS_Store
4 changes: 2 additions & 2 deletions hie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ cradle:
component: "elegant-git:lib"

- path: "./app/Main.hs"
component: "elegant-git:exe:git-elegant"
component: "elegant-git:exe:elegant-git"

- path: "./app/Paths_elegant_git.hs"
component: "elegant-git:exe:git-elegant"
component: "elegant-git:exe:elegant-git"

- path: "./test"
component: "elegant-git:test:elegant-git-test"
File renamed without changes.
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ library:
source-dirs: src

executables:
git-elegant:
elegant-git:
main: Main.hs
source-dirs: app
ghc-options:
Expand Down
37 changes: 37 additions & 0 deletions workflows.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -o errexit -o nounset -o pipefail
source ./libexec/plugins/text
symlink() {
sudo ln -s $(stack path --local-install-root)/bin/elegant-git /usr/local/bin/eg
}

commands=(
symlink
)

main() {
local command=${1}
if [[ -z ${command} ]]; then
question-text "Please select a command:"
echo ""
select choise in ${commands[@]} exit; do
if test ${choise} = "exit"; then exit; fi
command=${choise}
if test ${command} = testing; then
question-text "Please give the tests pattern: "
read args
fi
break
done
else
shift
fi
info-box "Run:" ${command} ${args:-${@}}
${command} ${args:-${@}}
if [[ ${command} =~ "test-" ]]; then
--report-containerized-jobs
fi
}

set +o nounset
main ${@}

0 comments on commit 5af646c

Please sign in to comment.