Skip to content

Commit 9a3411e

Browse files
committed
Add helper script to update example commits
1 parent 2491418 commit 9a3411e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

update-example-commits.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -eu -o pipefail
3+
4+
# Convenience script for the task of updating the git commits in the
5+
# example files.
6+
7+
# Update file
8+
COMMIT="$(git rev-parse HEAD)"
9+
perl -pi -e "s:/static-haskell-nix/archive/........................................:/static-haskell-nix/archive/${COMMIT}:g" static-stack2nix-builder-example/default.nix
10+
11+
# Commit
12+
git reset
13+
git add static-stack2nix-builder-example/default.nix
14+
git commit -m 'Update example commits'

0 commit comments

Comments
 (0)