-
Notifications
You must be signed in to change notification settings - Fork 2
/
entrypoint.sh
executable file
·39 lines (30 loc) · 1.07 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# ensure that any errors encountered cause immediate
# termination with a non-zero exit code
set -eo pipefail
echo "PWD is: "
echo $(pwd)
echo "Running ls..."
echo $(ls /)
echo "... done."
export PYTHONPATH=/:$PYTHONPATH
echo "Running ls /github/workspace..."
echo $(ls /github/workspace)
echo "... done."
echo "Running money_in script..."
python -m oldabe.money_in.__main__
echo "... done."
# Note that running this locally would cause your global
# git config to be modified
echo "Committing updated accounting records back to repo..."
git config --global user.email "[email protected]"
git config --global user.name "Old Abe"
git add abe/transactions.txt abe/attributions.txt abe/valuation.txt abe/itemized_payments.txt abe/advances.txt abe/debts.txt
git commit -m "Updated accounting records"
git fetch
git rebase origin/`git remote set-head origin -a | cut -d' ' -f4`
git push origin `git remote set-head origin -a | cut -d' ' -f4`
echo "... done."
echo "Running money_out script..."
echo balances=$(python -m oldabe.money_out.__main__) >> $GITHUB_OUTPUT
echo "... done."