Commit 24b5f77
authored
refactor: consolidate duplicated code across build scripts and Makefiles (#21)
* refactor: consolidate duplicated code across build scripts and Makefiles
- Create scripts/lib/logging.sh with centralized logging functions
- Create scripts/lib/common.sh with shared build utilities (normalize_license, verify_binary_arch, install_cmake_3x)
- Create shared/ffmpeg.mk with common FFmpeg codec options (BSD, LGPL, GPL)
- Refactor all platform build.sh scripts to use shared libraries
- Update docker/build.sh to use shared libraries
- Add STRIP variable to darwin config.mk files for consistency with linux
- Fix darwin-x64 terminal detection (was missing [[ -t 1 ]] check)
- Remove unused variables: CACHE_VERSION, AUTOCONF_DARWIN_ARGS, PARALLEL_CODECS, validate_versions
* style: fix SC2015 shellcheck warning in release.yml
Replace `A && B && C || D` pattern with proper if-then-else to avoid
ambiguous control flow that shellcheck warns about.1 parent 96ee0de commit 24b5f77
18 files changed
Lines changed: 386 additions & 593 deletions
File tree
- .github/workflows
- docker
- openspec
- platforms
- darwin-arm64
- darwin-x64
- linux-arm64
- linux-x64
- scripts/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
49 | 31 | | |
50 | 32 | | |
51 | 33 | | |
| |||
65 | 47 | | |
66 | 48 | | |
67 | 49 | | |
| 50 | + | |
68 | 51 | | |
69 | 52 | | |
70 | 53 | | |
| 54 | + | |
71 | 55 | | |
72 | 56 | | |
73 | 57 | | |
| |||
76 | 60 | | |
77 | 61 | | |
78 | 62 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 63 | + | |
| 64 | + | |
96 | 65 | | |
97 | 66 | | |
98 | 67 | | |
99 | 68 | | |
100 | 69 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 70 | | |
105 | 71 | | |
106 | 72 | | |
| |||
114 | 80 | | |
115 | 81 | | |
116 | 82 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 83 | | |
121 | 84 | | |
122 | 85 | | |
| |||
129 | 92 | | |
130 | 93 | | |
131 | 94 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 95 | + | |
136 | 96 | | |
137 | 97 | | |
138 | 98 | | |
139 | 99 | | |
140 | 100 | | |
141 | 101 | | |
142 | 102 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | 103 | | |
149 | 104 | | |
150 | 105 | | |
| |||
154 | 109 | | |
155 | 110 | | |
156 | 111 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 112 | + | |
161 | 113 | | |
162 | 114 | | |
163 | 115 | | |
| |||
168 | 120 | | |
169 | 121 | | |
170 | 122 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 123 | + | |
189 | 124 | | |
190 | 125 | | |
191 | 126 | | |
192 | | - | |
193 | | - | |
194 | 127 | | |
195 | 128 | | |
196 | 129 | | |
| |||
214 | 147 | | |
215 | 148 | | |
216 | 149 | | |
217 | | - | |
| 150 | + | |
218 | 151 | | |
219 | 152 | | |
220 | | - | |
| 153 | + | |
221 | 154 | | |
222 | 155 | | |
223 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 128 | + | |
150 | 129 | | |
151 | 130 | | |
152 | 131 | | |
| |||
0 commit comments