build: crazy workflow idea 69
All checks were successful
Build / build-linux (push) Successful in 13s
All checks were successful
Build / build-linux (push) Successful in 13s
This commit is contained in:
parent
4cb2b25ad3
commit
d935b12b35
@ -15,4 +15,7 @@ mv iw5/scripts/mp/_jump.gsc iw5/scripts/mp/_jump.c
|
||||
# perform macro expansion
|
||||
gcc -D_UTILITY_DEBUG -DIW5 -DCI -E "iw5/scripts/mp/_jump.c" -o _jump.in
|
||||
|
||||
mv _jump.in build/iw5/_jump.gsc
|
||||
# remove things gcc added to the file
|
||||
python3 .gitea/scripts/clean.py _jump.in _jump.gsc
|
||||
|
||||
mv _jump.gsc build/iw5/_jump.gsc
|
||||
|
20
.gitea/scripts/clean.py
Normal file
20
.gitea/scripts/clean.py
Normal file
@ -0,0 +1,20 @@
|
||||
import sys
|
||||
|
||||
def erase_commented_lines(filename, out):
|
||||
with open(filename, 'r') as file:
|
||||
lines = file.readlines()
|
||||
|
||||
lines = [line for line in lines if not line.startswith('#')]
|
||||
|
||||
with open(out, 'w') as file:
|
||||
file.writelines(lines)
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 3:
|
||||
print(f'Usage: python3 {sys.argv[0]} <in> <out>')
|
||||
return
|
||||
|
||||
erase_commented_lines(sys.argv[1], sys.argv[2])
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -18,7 +18,7 @@ jobs:
|
||||
.gitea/scripts/ci.sh
|
||||
|
||||
- name: Upload release
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release
|
||||
path: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user