mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 06:31:27 -07:00
21 lines
454 B
Bash
Executable File
21 lines
454 B
Bash
Executable File
#!/bin/bash
|
|
set -eu
|
|
|
|
repo_root=$(git rev-parse --show-toplevel)
|
|
cd "$repo_root"
|
|
|
|
# Stage changes so that changeset can see them
|
|
git add .
|
|
|
|
changeset
|
|
|
|
# Make sure a changeset was created
|
|
if ! git status --porcelain | grep '.changeset/.*\.md' >/dev/null; then
|
|
echo "🚨 No changeset created"
|
|
exit 1
|
|
fi
|
|
|
|
new_changeset=$(find .changeset -name "*.md" -type f -exec ls -t {} + | head -n 1)
|
|
echo "📝 New changeset: $new_changeset"
|
|
git add "$new_changeset"
|