mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-15 20:10:30 +00:00
ci: integrate source update into build workflow
This commit is contained in:
parent
b916fe51cc
commit
c5bad70d37
3 changed files with 56 additions and 86 deletions
22
.github/scripts/update_source.sh
vendored
Executable file
22
.github/scripts/update_source.sh
vendored
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
website_directory=${1:?Usage: update_source.sh WEBSITE_DIRECTORY RELEASE_VERSION}
|
||||
release_version=${2:?Usage: update_source.sh WEBSITE_DIRECTORY RELEASE_VERSION}
|
||||
|
||||
cd "$website_directory"
|
||||
|
||||
git config user.name 'GitHub Action'
|
||||
git config user.email 'action@github.com'
|
||||
|
||||
python3 updatesource.py index.json
|
||||
git add index.json
|
||||
|
||||
if git diff --staged --quiet; then
|
||||
echo 'Website/index.json is already current.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git commit -m "chore: update StikDebug source for $release_version"
|
||||
git push origin main
|
||||
Loading…
Add table
Add a link
Reference in a new issue