-
Notifications
You must be signed in to change notification settings - Fork 3
86 lines (75 loc) · 2.59 KB
/
multi.yml
File metadata and controls
86 lines (75 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: blmapV3multistarbox
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
blmapV3multistarbox:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup
run: |
old_commit="$(git log -3 --pretty=format:"%H" | tail -n1)"
wget -O ../master.map https://github.com/DDNetPP/maps/raw/master/blmapV3multistarbox.map
wget -O ../old.map "https://github.com/DDNetPP/maps/raw/$old_commit/blmapV3multistarbox.map"
cargo install twmap-tools
wget -O ../diff.sh https://raw.githubusercontent.com/lib-crash/lib-teeworlds/ffd36e74cc55dfd6f49ab08122d4a09a6a090ead/misc/mapdir_git_diff.sh
chmod +x ../diff.sh
python -m pip install --upgrade pip
pip install twmap
pip install numpy
git clone https://github.com/DDNetPP/maps-scripts ~/scripts
- name: Diff prev commit
run: |
twmap-edit ../old.map old --mapdir
twmap-edit blmapV3multistarbox.map new --mapdir
cd old || exit 1
{
git config --global init.defaultBranch main
git init
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global color.ui auto
git add . && git commit -m "init";
} >/dev/null
rm -rf *
cp -r ../new/* .
git --no-pager diff
- name: Preview diff prev commit
run: |
cd old
TERM=screen-256color ../../diff.sh 155 50 --buffer
- name: Status prev commit
run: cd old && git status
- name: Diff master
run: |
twmap-edit ../master.map master --mapdir
cd master || exit 1
{
git config --global init.defaultBranch main
git init
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global color.ui auto
git add . && git commit -m "init";
} >/dev/null
rm -rf *
cp -r ../new/* .
git --no-pager diff
- name: Preview diff master
run: |
cd old
TERM=screen-256color ../../diff.sh 155 50 --buffer
- name: Status master
run: cd old && git status