Skip to content

Commit

Permalink
Updating method to make use of cloning instead of submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
Zanger67 committed Jul 27, 2024
1 parent 85f1dee commit 60a1027
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
22 changes: 12 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ runs:
- name: Pull current version of markdown generator | Cloning if not present
shell: bash
run: |
if [ -d .readme_updater/ ]; then
echo "Submodule exists."
else
echo "Submodule not found. Adding..."
git submodule add https://github.com/Zanger67/Leetcode-Progress-Tracker.git '.readme_updater'
fi
git clone --recurse-submodules https://github.com/Zanger67/Leetcode-Progress-Tracker.git '.readme_updater'
# if [ -d .readme_updater/ ]; then
# echo "Submodule exists."
# else
# echo "Submodule not found. Adding..."
# git submodule add https://github.com/Zanger67/Leetcode-Progress-Tracker.git '.readme_updater'
# fi
echo "Initializing and updating submodules..."
git submodule update --init --recursive
git submodule update --recursive --remote
# echo "Initializing and updating submodules..."
# git submodule update --init --recursive
# git submodule update --recursive --remote
# cd .readme_updater
Expand Down Expand Up @@ -109,7 +111,7 @@ runs:
run: |
git config --global user.name "Zanger67/leetcode"
git config --global user.email "Zanger67[bot]@Zanger67.github.io"
git add .
git add -- . ':!.readme_updater'
git commit -m 'Updated markdown files' || exit 0
git push
2 changes: 1 addition & 1 deletion main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@
" with open(readmePath, 'w') as file :\n",
" username = getenv('LEETCODE_USERNAME')\n",
" file.write(f'# **[LeetCode Records](https://leetcode.com/u/{username}/)** ({qSolvedHeader})\\n\\n')\n",
" \n",
" file.write(f'<!-- This readme was generated using [WikiLeet](<https://github.com/Zanger67/WikiLeet>) -->')\n",
" file.write(f'> My LeetCode Profile: [{username}](https://leetcode.com/u/{username}/)\\n')\n",
" \n",
" # if difficultyBasedMarkdowns :\n",
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ def exportPrimaryReadme(dfQuestions: DataFrame,
with open(readmePath, 'w') as file :
username = getenv('LEETCODE_USERNAME')
file.write(f'# **[LeetCode Records](https://leetcode.com/u/{username}/)** ({qSolvedHeader})\n\n')

file.write(f'<!-- This readme was generated using [WikiLeet](<https://github.com/Zanger67/WikiLeet>) -->')
file.write(f'> My LeetCode Profile: [{username}](https://leetcode.com/u/{username}/)\n')

# if difficultyBasedMarkdowns :
Expand Down

0 comments on commit 60a1027

Please sign in to comment.