@@ -38,7 +38,7 @@ main() {
38
38
echo " Changing into homebrew-core directory"
39
39
cd homebrew-core && pwd
40
40
41
- echo " Adding Homebrew/homebrew-core as $( upstream ) "
41
+ echo " Adding Homebrew/homebrew-core"
42
42
git remote add upstream https://github.com/Homebrew/homebrew-core.git
43
43
44
44
# Make sure the git remote step is successful
@@ -49,18 +49,24 @@ main() {
49
49
exit 1
50
50
fi
51
51
52
+ # TODO@jsjoeio - can I somehow check that this succeeded?
52
53
echo " Fetching upstream Homebrew/hombrew-core commits"
53
54
git fetch upstream
54
55
56
+ # TODO@jsjoeio - can I somehow check that this succeeded?
55
57
echo " Merging in latest Homebrew/homebrew-core changes"
56
58
git merge upstream/master
57
59
58
60
echo " Pushing changes to cdrci/homebrew-core fork on GitHub"
59
61
# Source: https://serverfault.com/a/912788
60
62
# shellcheck disable=SC2016,SC2028
61
63
echo ' #!/bin/sh\nexec echo "$HOMEBREW_GITHUB_API_TOKEN"' > " $HOME " /.git-askpass.sh
64
+
65
+ # TODO@jsjoeio - check that git-askpass.sh was created
62
66
# Ensure it's executable since we just created it
63
67
chmod +x " $HOME /.git-askpass.sh"
68
+
69
+ # TODO@jsjoeio - check that git-askpass.sh has executable permissions
64
70
# GIT_ASKPASS lets us use the password when pushing without revealing it in the process list
65
71
# See: https://serverfault.com/a/912788
66
72
GIT_ASKPASS=
" $HOME /.git-askpass.sh" git push https://
[email protected] /cdr-oss/homebrew-core.git --all
@@ -80,6 +86,8 @@ main() {
80
86
# Clean up and remove homebrew-core
81
87
cd ..
82
88
rm -rf homebrew-core
89
+
90
+ # TODO@jsjoeio - check that homebrew-core was removed
83
91
}
84
92
85
93
main " $@ "
0 commit comments