Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-custom-free
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
ygopro-custom-free
Commits
2d97b71c
Commit
2d97b71c
authored
Mar 16, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add change detector
parent
59debdb4
Pipeline
#33687
passed with stages
in 51 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
run.sh
run.sh
+15
-2
No files found.
run.sh
View file @
2d97b71c
...
...
@@ -3,7 +3,7 @@
echo
"Cleaning up workspace and dist directories"
rm
-rf
workspace dist
||
true
mkdir
-p
workspace dist/redtexts dist/pics dist/script
mkdir
-p
workspace dist/redtexts dist/pics dist/script
dist/hashes
echo
'# Auto generated by ygopro-custom-free'
>
dist/strings.conf
# YGOPRO_SERVER_PATH="/home/nanahira/ygo/srvpro/ygopro"
...
...
@@ -12,6 +12,7 @@ echo '# Auto generated by ygopro-custom-free' > dist/strings.conf
CURRENT_TIME
=
$(
date
+%s
)
something_changed
=
0
process_repo
()
{
repo_url
=
"
$1
"
...
...
@@ -46,6 +47,7 @@ process_repo() {
# check last commit date
cd
"workspace/
$repo_identifer
"
last_commit_timestamp
=
"
$(
git log
-1
--format
=
"%cd"
--date
=
format:
'%s'
)
"
last_commit_hash
=
"
$(
git log
-1
--format
=
"%H"
)
"
echo
"Checking last commit date of
$repo_identifer
:
$(
git log
-1
--format
=
"%cd"
)
"
cd
"
$current_path
"
...
...
@@ -54,8 +56,13 @@ process_repo() {
return
fi
echo
"Checking for redtexts in
$repo_identifer
"
# fetch previous hash
previous_hash
=
$(
curl
-sL
"https://cdn02.moecube.com:444/ygopro-custom-free/contents/hashes/
$repo_identifer
.txt"
||
true
)
if
[[
$previous_hash
!=
$last_commit_hash
]]
;
then
something_changed
=
1
fi
echo
"Checking for redtexts in
$repo_identifer
"
cd
"
$YGOPRO_SERVER_PATH
"
rm
expansions
||
rmdir
expansions
||
true
...
...
@@ -85,6 +92,7 @@ process_repo() {
fi
cp
-rf
workspace/
$repo_identifer
/pics dist/
cp
-rf
workspace/
$repo_identifer
/script dist/
echo
"
$last_commit_hash
"
>
dist/hashes/
$repo_identifer
.txt
echo
"Finished processing
$repo_identifer
"
}
...
...
@@ -97,5 +105,10 @@ for file in repos/*.txt; do
done
<
"
$file
"
done
if
[[
$something_changed
==
0
]]
;
then
echo
"No changes detected, skipping update"
exit
1
fi
echo
"Finished processing all repos"
echo
"YGOPro Custom Free Server - Updated at
$(
date
)
"
>
dist/version.txt
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment