Skip to content

Commit

Permalink
chore: test commiting .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
lqiu96 committed Sep 30, 2022
1 parent 38a927d commit 77e4135
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions generation/generate_diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,30 @@ git stash
git checkout "${current_branch}"
git stash pop

git checkout -b "${diff_non_java_branch}"

cp .gitignore .gitignore.old
ignore_list=( "*/.github/*" "*/.kokoro/*" "*/.samples/*" "*/CODE_OF_CONDUCT.md" "*/CONTRIBUTING.md" "*/LICENSE" "*/SECURITY.md" "*/java.header" "*/license-checks.xml" "*/renovate.json")
ignore_list=( "*/.github/*" "*/.kokoro/*" "*/.samples/*" "*/CODE_OF_CONDUCT.md" "*/CONTRIBUTING.md" "*/LICENSE" "*/SECURITY.md" "*/java.header" "*/license-checks.xml" "*/renovate.json" ".gitignore.old")

for ignore in "${ignore_list[@]}"
do
echo "${ignore}" >> .gitignore
done

git checkout -b "${diff_non_java_branch}"
git add .gitignore
git commit -m "chore: Ignore excluded files"

git add .
git reset -- .gitignore
git reset -- .gitignore.old
#git commit -m "chore: Adding non-java diffs" --no-verify
#git push origin "${diff_non_java_branch}" --force
git commit -m "chore: Adding non-java diffs" --no-verify

rm .gitignore
mv .gitignore.old .gitignore

git add .gitignore
git commit -m "chore: Reset .gitignore"

git push origin "${diff_non_java_branch}" --force

git checkout "${current_branch}"

echo "Done running script"

0 comments on commit 77e4135

Please sign in to comment.