mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Added bundle updates as part of commit
This commit is contained in:
parent
521b0e1ec4
commit
e0b14db778
2 changed files with 15 additions and 2 deletions
11
.github/workflows/push.yml
vendored
11
.github/workflows/push.yml
vendored
|
|
@ -21,5 +21,16 @@ jobs:
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
- name: Update bundles
|
||||||
|
if: ${{ github.repository == 'Anuken/Mindustry' }}
|
||||||
|
run: |
|
||||||
|
./gradlew updateBundles
|
||||||
|
git diff --exit-code
|
||||||
|
if [ $? ];
|
||||||
|
then
|
||||||
|
git add core/assets/bundles/*
|
||||||
|
git commit -m "Automatic bundle update"
|
||||||
|
git push
|
||||||
|
fi
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: ./gradlew clean cleanTest test --stacktrace
|
run: ./gradlew clean cleanTest test --stacktrace
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public class BundleLauncher{
|
||||||
int added = 0;
|
int added = 0;
|
||||||
|
|
||||||
for(String key : base.orderedKeys()){
|
for(String key : base.orderedKeys()){
|
||||||
if(!other.containsKey(key) || other.get(key).trim().isEmpty()){
|
if(other.get(key) == null || other.get(key).trim().isEmpty()){
|
||||||
other.put(key, base.get(key));
|
other.put(key, base.get(key));
|
||||||
added++;
|
added++;
|
||||||
Log.info("&lc- Adding missing key '@'...", key);
|
Log.info("&lc- Adding missing key '@'...", key);
|
||||||
|
|
@ -73,7 +73,9 @@ public class BundleLauncher{
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
|
|
||||||
//add everything ordered
|
//add everything ordered
|
||||||
for(String key : base.orderedKeys().and(extras.keys().toSeq())){
|
for(String key : base.orderedKeys().copy().and(extras.keys().toSeq())){
|
||||||
|
if(other.get(key) == null) continue;
|
||||||
|
|
||||||
result.append(processor.get(key, other.get(key)));
|
result.append(processor.get(key, other.get(key)));
|
||||||
other.remove(key);
|
other.remove(key);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue