Skip to content

Commit efcff60

Browse files
committed
Fix unable to retrieve data from a branch not locally accessible
1 parent 24b6464 commit efcff60

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

update-changelog.bash

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,22 @@
33
# Automate the process of updating the CHANGELOG.md file, based on the latest commit
44
# messages from the dotfiles submodule.
55
#
6-
# Version: v1.1.1
6+
# Version: v1.1.2
77
# License: MIT License
88
# Copyright (c) 2024-2025 Hunter T. (StrangeRanger)
99
#
1010
########################################################################################
1111
####[ Global Variables ]################################################################
1212

1313

14-
###
15-
### Configurable variables.
16-
###
17-
18-
readonly C_REFERENCE_BRANCH="main"
19-
20-
###
21-
### Non-configurable variables.
22-
###
23-
14+
readonly C_REF_BRANCH="origin/main"
2415
readonly C_CHANGELOG="CHANGELOG.md"
2516
readonly C_TMP_CHANGELOG="CHANGELOG.tmp"
2617
readonly C_SUBMODULE_PATH="submodules/dotfiles"
2718

28-
C_REFERENCE_BRANCH_COMMIT=$(git rev-parse "$C_REFERENCE_BRANCH":submodules/dotfiles)
19+
C_REF_BRANCH_COMMIT=$(git rev-parse "$C_REF_BRANCH":submodules/dotfiles)
2920
C_DATE=$(date +%Y-%m-%d)
30-
readonly C_REFERENCE_BRANCH_COMMIT C_DATE
21+
readonly C_REF_BRANCH_COMMIT C_DATE
3122

3223
## ANSI color codes.
3324
C_BLUE="$(printf '\033[0;34m')"
@@ -55,7 +46,7 @@ git submodule update --init "$C_SUBMODULE_PATH"
5546
echo "${C_INFO}Checking out the latest commit of the submodule 'dotfiles' in the" \
5647
"reference branch..."
5748

58-
git -C "$C_SUBMODULE_PATH" checkout "$C_REFERENCE_BRANCH_COMMIT"
49+
git -C "$C_SUBMODULE_PATH" checkout "$C_REF_BRANCH_COMMIT"
5950

6051
###
6152
### Extract latest commit messages.

0 commit comments

Comments
 (0)