├── .editorconfig ├── .gitattributes ├── .gitignore ├── .npmrc ├── changelog.md ├── code-of-conduct.md ├── index.js ├── license ├── package.json ├── readme.md ├── template ├── assets.yml └── release.yml ├── test.js └── utils ├── downloadAssets.js ├── exitClone.js ├── finishLine.js ├── handleError.js ├── handleTemplate.js ├── query.js ├── sbx.js ├── shouldCancel.js └── welcome.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.yml] 11 | indent_style = space 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # NPM # 2 | ########## 3 | # Ignore all directories called node_modules in current folder and any subfolders. 4 | node_modules/ 5 | /node_modules/ 6 | 7 | # Packages # 8 | ############ 9 | *.7z 10 | *.dmg 11 | *.gz 12 | *.bz2 13 | *.iso 14 | *.jar 15 | *.rar 16 | *.tar 17 | *.zip 18 | *.tgz 19 | *.map 20 | 21 | # Logs and databases # 22 | ###################### 23 | *.log 24 | *.sql 25 | *.env 26 | 27 | # OS generated files # 28 | ###################### 29 | **.DS_Store* 30 | ehthumbs.db 31 | Icon? 32 | Thumbs.db 33 | ._* 34 | 35 | # Vim generated files # 36 | ###################### 37 | *.un~ 38 | 39 | # SASS # 40 | ########## 41 | **/.sass-cache 42 | **/.sass-cache/* 43 | **/.map 44 | 45 | # Composer # 46 | ########## 47 | !assets/js/vendor/ 48 | wpcs/ 49 | /vendor/ 50 | 51 | # Bower # 52 | ########## 53 | assets/bower_components/* 54 | 55 | # Codekit # 56 | ########## 57 | /codekit-config.json 58 | *.codekit 59 | **.codekit-cache/* 60 | 61 | # Compiled Files and Build Dirs # 62 | ########## 63 | /README.html 64 | 65 | # PhpStrom Project Files # 66 | .idea/ 67 | library/vendors/composer 68 | assets/img/.DS_Store 69 | 70 | # No lock files. 71 | package-lock.json 72 | yarn.lock 73 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | All notable changes in this project's [released versions](../../releases) are documented in this file. 4 | 5 | [![VSCode](https://img.shields.io/badge/-VSCode.pro%20%E2%86%92-gray.svg?colorB=4D2AFF)](https://VSCode.pro/?utm_source=GitHubFOSS) 6 | [![Ahmad on Twitter](https://img.shields.io/twitter/follow/mrahmadawais.svg?style=social&label=Follow%20@MrAhmadAwais)](https://twitter.com/mrahmadawais/) 7 | 8 |
9 | 10 | I have released a video course to help you become a better developer — Become a VSCode Power User →

11 | 12 |
VSCode
→ 13 | 14 |
15 | 16 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 17 | 18 | **CHANGELOG KEY**: `📦 NEW`, `👌 IMPROVE`, `🐛 FIX`, `📖 DOC`, `🚀 RELEASE`, and `✅ TEST` 19 | 20 | 21 | 22 | > _I use [Emoji-log](https://github.com/ahmadawais/Emoji-Log), you should try it and simplify your git commits._ 23 | 24 | 25 | 26 |
27 | 28 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 29 | 30 |
31 | 32 | ### RELEASE: [1.7.1](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.7.0...1.7.1) 33 | 34 |
35 | 36 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 37 | 38 |
39 | 40 | ### RELEASE: [1.7.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.6.0...1.7.0) 41 | 42 | ![📦 NEW:](https://img.shields.io/badge/-NEW-gray.svg?colorB=3778FF) 43 | 44 | > 📦 Git test [`a54032c`](https://github.com/ahmadawais/wp-continuous-deployment/commit/a54032ceb30049ef581aa9280d688860ddcbf16e)
45 | > 📦 Dir option [`06438b5`](https://github.com/ahmadawais/wp-continuous-deployment/commit/06438b59cefd75b7d915023ea638bd09c6d8b102)
46 | 47 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 48 | 49 | > 📖 Changelog update [`0a8c652`](https://github.com/ahmadawais/wp-continuous-deployment/commit/0a8c6520524fc5b03d392d72b07c41cc9bc6ddda)
50 | 51 |
52 | 53 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 54 | 55 |
56 | 57 | ### RELEASE: [1.6.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.5.1...1.6.0) 58 | 59 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 60 | 61 | > 🐛 Typo + Brand color [`a4a38d5`](https://github.com/ahmadawais/wp-continuous-deployment/commit/a4a38d5b3b907d34377cbc25e616870f26bcad14)
62 | 63 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 64 | 65 | > 📖 Changelog update [`283ef0b`](https://github.com/ahmadawais/wp-continuous-deployment/commit/283ef0be72981d2f9da273028e522eb8300661b8)
66 | 67 |
68 | 69 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 70 | 71 |
72 | 73 | ### RELEASE: [1.5.1](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.4.0...1.5.1) 74 | 75 | ![👌 IMPROVE:](https://img.shields.io/badge/-IMPROVEMENT-gray.svg?colorB=39AA54) 76 | 77 | > 👌 Merge branch 'master' [`5dcc34e`](https://github.com/ahmadawais/wp-continuous-deployment/commit/5dcc34e5b4884b2ffffe8112ea7f0e517f0b4ef2)
78 | 79 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 80 | 81 | > 🐛 Typo [`27d8206`](https://github.com/ahmadawais/wp-continuous-deployment/commit/27d82062fda5a82f185a61214ed70cc29787d266)
82 | 83 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 84 | 85 | > 📖 Changelog update [`e2e9368`](https://github.com/ahmadawais/wp-continuous-deployment/commit/e2e93685ea6fb23d85c1bd7d63963025bd7caea8)
86 | > 📖 Changelog update [`e5fc723`](https://github.com/ahmadawais/wp-continuous-deployment/commit/e5fc723ea7b0b83ae21572c4e928de8136e5299d)
87 | 88 |
89 | 90 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 91 | 92 |
93 | 94 | ### RELEASE: [1.4.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.3.0...1.4.0) 95 | 96 | ![📦 NEW:](https://img.shields.io/badge/-NEW-gray.svg?colorB=3778FF) 97 | 98 | > 📦 Deps update [`13890eb`](https://github.com/ahmadawais/wp-continuous-deployment/commit/13890eb71601517ec635e20d69f3f81966b57de7)
99 | 100 | ![👌 IMPROVE:](https://img.shields.io/badge/-IMPROVEMENT-gray.svg?colorB=39AA54) 101 | 102 | > 👌 Lingo [`84a1021`](https://github.com/ahmadawais/wp-continuous-deployment/commit/84a10219ea9b53b3a406c7fa57d8fa18862dc4ac)
103 | 104 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 105 | 106 | > 📖 Changelog update [`ebd2fe9`](https://github.com/ahmadawais/wp-continuous-deployment/commit/ebd2fe9302768b66a049594bcef950fb1dd56d5b)
107 | 108 |
109 | 110 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 111 | 112 |
113 | 114 | ### RELEASE: [1.3.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.2.0...1.3.0) 115 | 116 | ![📦 NEW:](https://img.shields.io/badge/-NEW-gray.svg?colorB=3778FF) 117 | 118 | > 📦 Gif [`e436940`](https://github.com/ahmadawais/wp-continuous-deployment/commit/e436940b13c051065e526d86138e083efe80962a)
119 | 120 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 121 | 122 | > 🐛 Typos [`ff02c14`](https://github.com/ahmadawais/wp-continuous-deployment/commit/ff02c14b89816529df7d4842a270571daabf990a)
123 | > 🐛 Bad instruction [`9922e33`](https://github.com/ahmadawais/wp-continuous-deployment/commit/9922e336514c1e478d471c21fe8a0c5f5a459806)
124 | 125 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 126 | 127 | > 📖 Changelog update [`3571696`](https://github.com/ahmadawais/wp-continuous-deployment/commit/35716966deced7daed41366f4ea59618a05c1482)
128 | > 📖 Lingo Format [`cb40880`](https://github.com/ahmadawais/wp-continuous-deployment/commit/cb40880042272a810e651c4acde57f5b1153be42)
129 | > 📖 Lingo [`d510525`](https://github.com/ahmadawais/wp-continuous-deployment/commit/d510525a6141513bf59adb6fce86254d448a1805)
130 | > 📖 Name [`4205a98`](https://github.com/ahmadawais/wp-continuous-deployment/commit/4205a986403066cca33423e014ca9987322af48b)
131 | > 📖 Gif or didn't happen [`f6eac9f`](https://github.com/ahmadawais/wp-continuous-deployment/commit/f6eac9fd483375b6c3c8e4ae0ccd3607b37cf769)
132 | > 📖 Credits [`a6e5d12`](https://github.com/ahmadawais/wp-continuous-deployment/commit/a6e5d1285d703877d4c5959023188500869fc4b6)
133 | 134 |
135 | 136 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 137 | 138 |
139 | 140 | ### RELEASE: [1.2.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.1.0...1.2.0) 141 | 142 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 143 | 144 | > 🐛 Extraneous logs and modules [`cd68d60`](https://github.com/ahmadawais/wp-continuous-deployment/commit/cd68d6087b1d2fff12e94251a3976a471f64a112)
145 | 146 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 147 | 148 | > 📖 Changelog update [`e01cec6`](https://github.com/ahmadawais/wp-continuous-deployment/commit/e01cec6b5187e70b57d15b2f1bc6aa1306bf1ea4)
149 | 150 |
151 | 152 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 153 | 154 |
155 | 156 | ### RELEASE: [1.1.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.0.3...1.1.0) 157 | 158 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 159 | 160 | > 🐛 Current working dir [`28f6538`](https://github.com/ahmadawais/wp-continuous-deployment/commit/28f6538e81ad12f36b5241cd283b3abebdbbeb7c)
161 | 162 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 163 | 164 | > 📖 Changelog update [`9c25267`](https://github.com/ahmadawais/wp-continuous-deployment/commit/9c25267aee2ff2369f8c8869f46aed92242f8100)
165 | 166 |
167 | 168 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 169 | 170 |
171 | 172 | ### RELEASE: [1.0.3](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.0.2...1.0.3) 173 | 174 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 175 | 176 | > 🐛 Current working dir [`9d6c72e`](https://github.com/ahmadawais/wp-continuous-deployment/commit/9d6c72e975479aa1f3bcc2d0e0e9b41b8fc935bc)
177 | 178 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 179 | 180 | > 📖 Changelog update [`12cf7c9`](https://github.com/ahmadawais/wp-continuous-deployment/commit/12cf7c95fd4831495b7fa2b0274eda0b5f962feb)
181 | 182 |
183 | 184 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 185 | 186 |
187 | 188 | ### RELEASE: [1.0.2](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.0.1...1.0.2) 189 | 190 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 191 | 192 | > 🐛 Download Dir [`fcb1d6d`](https://github.com/ahmadawais/wp-continuous-deployment/commit/fcb1d6dcf0aa96d24dda641aeccb3897897f8184)
193 | 194 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 195 | 196 | > 📖 Changelog update [`2184fd6`](https://github.com/ahmadawais/wp-continuous-deployment/commit/2184fd6e78c9c6db32b585c2d1d2b8fa1a847610)
197 | 198 |
199 | 200 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 201 | 202 |
203 | 204 | ### RELEASE: [1.0.1](https://github.com/ahmadawais/wp-continuous-deployment/compare/1.0.0...1.0.1) 205 | 206 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 207 | 208 | > 📖 Changelog update [`eaabd43`](https://github.com/ahmadawais/wp-continuous-deployment/commit/eaabd43c2c2f86aa98dedb80cffa38f94c310710)
209 | > 📖 General Availability [`9f3d8e2`](https://github.com/ahmadawais/wp-continuous-deployment/commit/9f3d8e2e0142872ea20a6f1000f89bf27bf9c5d4)
210 | 211 |
212 | 213 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 214 | 215 |
216 | 217 | ### RELEASE: [1.0.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.9.2...1.0.0) 218 | 219 | ![📦 NEW:](https://img.shields.io/badge/-NEW-gray.svg?colorB=3778FF) 220 | 221 | > 📦 Empty Dir [`5b33c69`](https://github.com/ahmadawais/wp-continuous-deployment/commit/5b33c697325a809d3570504e402b83808d0e2dba)
222 | 223 | ![👌 IMPROVE:](https://img.shields.io/badge/-IMPROVEMENT-gray.svg?colorB=39AA54) 224 | 225 | > 👌 Sync downloads [`6b9bc9e`](https://github.com/ahmadawais/wp-continuous-deployment/commit/6b9bc9ec44664ce149ff64666c325ff81f2016f2)
226 | > 👌 Finish line messages [`5e90ddd`](https://github.com/ahmadawais/wp-continuous-deployment/commit/5e90ddd18d78f2e79eb75f2cbdefee2f546e45c1)
227 | 228 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 229 | 230 | > 📖 Improve instructions [`09ca108`](https://github.com/ahmadawais/wp-continuous-deployment/commit/09ca108bb553f3089906b049ab3a40d0377b6a5a)
231 | > 📖 Changelog update [`6d4560e`](https://github.com/ahmadawais/wp-continuous-deployment/commit/6d4560e24b62d1411d74598fea0a8211cbf97aa5)
232 | 233 |
234 | 235 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 236 | 237 |
238 | 239 | ### RELEASE: [0.9.2](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.9.1...0.9.2) 240 | 241 | ![👌 IMPROVE:](https://img.shields.io/badge/-IMPROVEMENT-gray.svg?colorB=39AA54) 242 | 243 | > 👌 Rename the build [`e0c0204`](https://github.com/ahmadawais/wp-continuous-deployment/commit/e0c02049797c6328a0317aef4817f77d640d8bd6)
244 | 245 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 246 | 247 | > 📖 Changelog update [`e0541a7`](https://github.com/ahmadawais/wp-continuous-deployment/commit/e0541a784fb2446fbf1672e878db52331f461a07)
248 | 249 |
250 | 251 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 252 | 253 |
254 | 255 | ### RELEASE: [0.9.1](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.9.0...0.9.1) 256 | 257 | ![👌 IMPROVE:](https://img.shields.io/badge/-IMPROVEMENT-gray.svg?colorB=39AA54) 258 | 259 | > 👌 Slug situation [`ed69f91`](https://github.com/ahmadawais/wp-continuous-deployment/commit/ed69f916f1edeb887663309bb96deb652c1b43b0)
260 | 261 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 262 | 263 | > 📖 Changelog update [`1e1e57a`](https://github.com/ahmadawais/wp-continuous-deployment/commit/1e1e57af01e1b2ce8e9af1f553e0b8ac1df300e0)
264 | 265 |
266 | 267 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 268 | 269 |
270 | 271 | ### RELEASE: [0.9.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.8.0...0.9.0) 272 | 273 | ![👌 IMPROVE:](https://img.shields.io/badge/-IMPROVEMENT-gray.svg?colorB=39AA54) 274 | 275 | > 👌 Docs [`de5d639`](https://github.com/ahmadawais/wp-continuous-deployment/commit/de5d6394512f4b12ef1159c3fcbc2e97003eeebd)
276 | 277 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 278 | 279 | > 📖 Changelog update [`4eb97e9`](https://github.com/ahmadawais/wp-continuous-deployment/commit/4eb97e9183b1566aed542b3d6e1e7c41be8569ae)
280 | 281 |
282 | 283 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 284 | 285 |
286 | 287 | ### RELEASE: [0.8.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.7.0...0.8.0) 288 | 289 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 290 | 291 | > 🐛 Workflows directory [`0fb3fe2`](https://github.com/ahmadawais/wp-continuous-deployment/commit/0fb3fe2a836457e9e7f570045e261fae7cdbb324)
292 | 293 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 294 | 295 | > 📖 Changelog update [`5868483`](https://github.com/ahmadawais/wp-continuous-deployment/commit/5868483aad2017d373b76d5b9fe16ab0d1b159ee)
296 | 297 |
298 | 299 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 300 | 301 |
302 | 303 | ### RELEASE: [0.7.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.6.0...0.7.0) 304 | 305 | ![👌 IMPROVE:](https://img.shields.io/badge/-IMPROVEMENT-gray.svg?colorB=39AA54) 306 | 307 | > 👌 Docs grammar [`15202a0`](https://github.com/ahmadawais/wp-continuous-deployment/commit/15202a0decab1cb0c9b06dce1a0570fafd397794)
308 | > 👌 Lingo [`5ab640b`](https://github.com/ahmadawais/wp-continuous-deployment/commit/5ab640b1a9c8976d702afd1c03aad02437f3975d)
309 | > 👌 Syntax format [`9f03858`](https://github.com/ahmadawais/wp-continuous-deployment/commit/9f038580e7224a01b105481467f72aa51e512ea2)
310 | 311 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 312 | 313 | > 🐛 Workflows [`1b79674`](https://github.com/ahmadawais/wp-continuous-deployment/commit/1b79674e79a2ad0d75271ddcd9471c292fbad20a)
314 | 315 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 316 | 317 | > 📖 Changelog update [`16ac479`](https://github.com/ahmadawais/wp-continuous-deployment/commit/16ac479136520993ea8ef94e227f566cd77cd602)
318 | 319 |
320 | 321 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 322 | 323 |
324 | 325 | ### RELEASE: [0.6.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.5.0...0.6.0) 326 | 327 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 328 | 329 | > 📖 New release docs [`a3d7e4e`](https://github.com/ahmadawais/wp-continuous-deployment/commit/a3d7e4e024441abec3a58ccb48051f2536160902)
330 | > 📖 Changelog update [`d1de036`](https://github.com/ahmadawais/wp-continuous-deployment/commit/d1de03638f67888b5ac680cd89f4a8b87bcd808e)
331 | 332 |
333 | 334 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 335 | 336 |
337 | 338 | ### RELEASE: [0.5.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.4.0...0.5.0) 339 | 340 | ![📦 NEW:](https://img.shields.io/badge/-NEW-gray.svg?colorB=3778FF) 341 | 342 | > 📦 Download Assets [`47e977d`](https://github.com/ahmadawais/wp-continuous-deployment/commit/47e977d6b04b91e6f027e3f1e4d663f771bfd4d7)
343 | > 📦 Automated GitHub Origin URL [`ead338a`](https://github.com/ahmadawais/wp-continuous-deployment/commit/ead338aa6296c0a9bb194c0abf629602c3e88f76)
344 | 345 | ![👌 IMPROVE:](https://img.shields.io/badge/-IMPROVEMENT-gray.svg?colorB=39AA54) 346 | 347 | > 👌 Refactor [`a6186d0`](https://github.com/ahmadawais/wp-continuous-deployment/commit/a6186d0070e999249d067b6eee5abe02226e8711)
348 | > 👌 Lingo [`72828a1`](https://github.com/ahmadawais/wp-continuous-deployment/commit/72828a15819b9ff73377f4a63182cb50b68dc2ff)
349 | > 👌 Syntax format [`48f5fe7`](https://github.com/ahmadawais/wp-continuous-deployment/commit/48f5fe7acb0ae0cc07148248f4ef70d0c1ce9e8b)
350 | > 👌 Refactor welcome [`79d6cc2`](https://github.com/ahmadawais/wp-continuous-deployment/commit/79d6cc24592bff549481ec7a1797a41a290d37ea)
351 | > 👌 Clean logs [`a8c50a6`](https://github.com/ahmadawais/wp-continuous-deployment/commit/a8c50a6688789689c6b8e9111e03b4862e77b0f9)
352 | 353 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 354 | 355 | > 🐛 Dynamic link [`bed5dbf`](https://github.com/ahmadawais/wp-continuous-deployment/commit/bed5dbf59e3e2f00174ec5c35167a24a2497ae55)
356 | > 🐛 Extraneous [`d6dcb1d`](https://github.com/ahmadawais/wp-continuous-deployment/commit/d6dcb1da9ec028aab817b180855efa9c8c76bf4d)
357 | > 🐛 Extraneous [`1ead08d`](https://github.com/ahmadawais/wp-continuous-deployment/commit/1ead08d6ce4bd091645ac14653f785cc924e7371)
358 | > 🐛 Log [`ccd0637`](https://github.com/ahmadawais/wp-continuous-deployment/commit/ccd0637b0b276b2483f1b5917bd9018f404bdc3b)
359 | 360 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 361 | 362 | > 📖 Changelog update [`12685cd`](https://github.com/ahmadawais/wp-continuous-deployment/commit/12685cda0676288ace7954bfccf824e2979c99ce)
363 | 364 |
365 | 366 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 367 | 368 |
369 | 370 | ### RELEASE: [0.4.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.3.0...0.4.0) 371 | 372 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 373 | 374 | > 🐛 Files [`29199a0`](https://github.com/ahmadawais/wp-continuous-deployment/commit/29199a08781563e28f431aaa791f9be6b413504c)
375 | 376 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 377 | 378 | > 📖 Changelog update [`a061598`](https://github.com/ahmadawais/wp-continuous-deployment/commit/a061598c31595a3376b6474b799587149ab65969)
379 | 380 |
381 | 382 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 383 | 384 |
385 | 386 | ### RELEASE: [0.3.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.2.0...0.3.0) 387 | 388 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 389 | 390 | > 🐛 Extraneous [`0110d54`](https://github.com/ahmadawais/wp-continuous-deployment/commit/0110d54beebe502477e8893b2994c340c33a2c77)
391 | > 🐛 Paths [`039b966`](https://github.com/ahmadawais/wp-continuous-deployment/commit/039b9663232fba76915747f175efe26b1c77838d)
392 | 393 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 394 | 395 | > 📖 Changelog update [`77ba867`](https://github.com/ahmadawais/wp-continuous-deployment/commit/77ba86773d3e3cf40fa5e6ec71482d6fd1561fca)
396 | 397 |
398 | 399 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 400 | 401 |
402 | 403 | ### RELEASE: [0.2.0](https://github.com/ahmadawais/wp-continuous-deployment/compare/0.1.0...0.2.0) 404 | 405 | ![📦 NEW:](https://img.shields.io/badge/-NEW-gray.svg?colorB=3778FF) 406 | 407 | > 📦 Bin script [`dcd8cc3`](https://github.com/ahmadawais/wp-continuous-deployment/commit/dcd8cc30f5487e522e203e73d3d6c6ecd3335347)
408 | 409 | ![👌 IMPROVE:](https://img.shields.io/badge/-IMPROVEMENT-gray.svg?colorB=39AA54) 410 | 411 | > 👌 First version [`6899a19`](https://github.com/ahmadawais/wp-continuous-deployment/commit/6899a19a26fb8718772e876c3b594163610a34b0)
412 | > 👌 Modules [`c3cc26e`](https://github.com/ahmadawais/wp-continuous-deployment/commit/c3cc26ec3e423f5a4110488e03fef42cb4fbc08a)
413 | 414 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 415 | 416 | > 📖 Changelog update [`9e18d64`](https://github.com/ahmadawais/wp-continuous-deployment/commit/9e18d6427fc2c26b3cbcd81ad9e60639266c9a37)
417 | > 📖 WIP [`548899f`](https://github.com/ahmadawais/wp-continuous-deployment/commit/548899fad3dfac9b8956ea272ef7aa826d59be86)
418 | 419 |
420 | 421 | [![hr](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/hr.png)](/) 422 | 423 |
424 | 425 | ### RELEASE: 0.1.0 426 | 427 | ![📦 NEW:](https://img.shields.io/badge/-NEW-gray.svg?colorB=3778FF) 428 | 429 | > 📦 First commit [`fb21981`](https://github.com/ahmadawais/wp-continuous-deployment/commit/fb21981521c8d5c5d143ae6c78daeb5ba1d16069)
430 | > 📦 Welcome [`cad1d7c`](https://github.com/ahmadawais/wp-continuous-deployment/commit/cad1d7c19f55e22e8fe33adaeee39799952f2784)
431 | 432 | ![🐛 FIX:](https://img.shields.io/badge/-FIX-gray.svg?colorB=ff6347) 433 | 434 | > 🐛 Version [`1a57907`](https://github.com/ahmadawais/wp-continuous-deployment/commit/1a57907a7895229a4d70fd6cbf55784d4096fa7a)
435 | 436 | ![📖 DOC:](https://img.shields.io/badge/-DOCS-gray.svg?colorB=978CD4) 437 | 438 | > 📖 Changelog update [`6d64df2`](https://github.com/ahmadawais/wp-continuous-deployment/commit/6d64df2fc6f54f1af861b73f8a51a2dfe93f973a)
439 | 440 |
441 | 442 |
443 | 444 | [![📃](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/license.png)](/) 445 | 446 | ## License & Conduct 447 | 448 | - MIT © [Ahmad Awais](https://twitter.com/MrAhmadAwais/) 449 | - [Code of Conduct](code-of-conduct.md) 450 | 451 |
452 | 453 | [![🙌](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/connect.png)](/) 454 | 455 | ## Connect 456 | 457 |
458 |

GitHub @AhmadAwais (follow) TO STAY UP TO DATE ON FREE & OPEN SOURCE SOFTWARE

459 |

Twitter @MrAhmadAwais (follow) TO GET ONE DEV MINUTE DAILY HOT TIPS & TROLLS

460 |

YouTube AhmadAwais (subscribe) TO TECH TALKS & ONE DEV MINUTE VIDEOS

461 |

Blog: AhmadAwais.com (read) MOSTLY LONG FORM TECHNICAL ARTICLES

462 |

LinkedIn @MrAhmadAwais (connect) WITH THE LINKEDIN PROFILE Y'ALL

463 |
464 | 465 |
466 | 467 | [![👌](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/sponsor.png)](/) 468 | 469 | ## Sponsor 470 | 471 | Me ([Ahmad Awais](https://twitter.com/mrahmadawais/)) and my incredible wife ([Maedah Batool](https://twitter.com/MaedahBatool/)) are two engineers who fell in love with open source and then with each other. You can read more [about me here](https://ahmadawais.com/about). If you or your company use any of my projects or like what I’m doing then consider backing me. I'm in this for the long run. An open-source developer advocate. 472 | 473 | - 🌟 **$9.99/month (recommended)** ❯ [Two cups of Caffè latte (coffee) every month →](https://pay.paddle.com/checkout/540217) 474 | - 🚀 **$99.99 (one-time sponsor)** ❯ [Support an hour of open-source code →](https://pay.paddle.com/checkout/515568) 475 | - 🔰 **$49.99 (one-time sponsor)** ❯ [Support an hour of maintenance →](https://pay.paddle.com/checkout/527253) 476 | - ☕️ **$9.99 (one-time sponsor)** ❯ [Lunch/coffee →](https://pay.paddle.com/checkout/527254) 477 | 478 |
479 | 480 | Or you can back me by checking out my super fun video course. As developers, we spend over 200 Hrs/month with our code editors — it's only fair to learn your next editor deeply. This course will save you 15-20 hours every month. Become a VSCode Power User

481 | 482 |
VSCODE
483 | 484 |
485 | 486 | [![VSCode](https://img.shields.io/badge/-VSCode.pro%20%E2%86%92-gray.svg?colorB=4D2AFF&style=flat)](https://VSCode.pro/?utm_source=GitHubFOSS) 487 | [![Ahmad on Twitter](https://img.shields.io/twitter/follow/mrahmadawais.svg?style=social&label=Follow%20@MrAhmadAwais)](https://twitter.com/mrahmadawais/) 488 | -------------------------------------------------------------------------------- /code-of-conduct.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at me@AhmadAwais.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [https://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: https://contributor-covenant.org 74 | [version]: https://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Makes the script crash on unhandled rejections instead of silently 4 | // ignoring them. In the future, promise rejections that are not handled will 5 | // terminate the Node.js process with a non-zero exit code. 6 | process.on('unhandledRejection', err => { 7 | handleError(`UNHANDLED ERROR`, err); 8 | }); 9 | 10 | const ora = require('ora'); 11 | const spinner = ora({ text: '' }); 12 | const chalk = require('chalk'); 13 | const to = require('await-to-js').default; 14 | const handlebars = require('handlebars'); 15 | const { Toggle, prompt } = require('enquirer'); 16 | const gitRemoteOriginUrl = require('git-remote-origin-url'); 17 | const handleError = require('./utils/handleError.js'); 18 | const welcome = require('./utils/welcome.js'); 19 | const finishLine = require('./utils/finishLine.js'); 20 | const handleTemplate = require('./utils/handleTemplate.js'); 21 | const shouldCancel = require('./utils/shouldCancel.js'); 22 | const exitClone = require('./utils/exitClone.js'); 23 | const downloadAssets = require('./utils/downloadAssets.js'); 24 | const gParse = require('git-url-parse'); 25 | const isItGit = require('is-it-git'); 26 | const dim = chalk.dim; 27 | const yellow = chalk.bold.yellow; 28 | const green = chalk.bold.green; 29 | handlebars.registerHelper('raw-helper', options => options.fn()); 30 | 31 | (async () => { 32 | welcome(); 33 | 34 | // Root. 35 | const promptClone = new Toggle({ 36 | name: `clone`, 37 | message: `Are you running this in the root directory of your WordPress plugin's GitHub repo clone?` 38 | }); 39 | 40 | const [errClone, clone] = await to(promptClone.run()); 41 | handleError(`FAILED ON CLONE`, errClone); 42 | await shouldCancel(clone); 43 | 44 | // Moving forward. 45 | exitClone(clone); 46 | exitClone(isItGit()); 47 | 48 | // Slug. 49 | const promptSlug = { 50 | type: `input`, 51 | name: `wpslug`, 52 | initial: `cf7-customizer`, 53 | message: `What is your WordPress.org plugin slug?\n${dim( 54 | `It's the last part of the URL, after ${dim(`"https://wordpress.org/plugins/"`)} e.g.` 55 | )}` 56 | }; 57 | const [errSlug, wpslug] = await to(prompt(promptSlug)); 58 | handleError(`FAILED ON SLUG`, errSlug); 59 | await shouldCancel(wpslug); 60 | const slug = wpslug.wpslug; 61 | 62 | // GitHub. 63 | const getGitHubUrl = await gitRemoteOriginUrl(); 64 | const urlObj = getGitHubUrl ? gParse(getGitHubUrl) : false; 65 | const gitHubUrl = urlObj ? `https://github.com/${urlObj.owner}/${urlObj.name}` : false; 66 | 67 | if (!gitHubUrl) { 68 | const promptUrl = { 69 | type: `input`, 70 | name: `url`, 71 | initial: `https://github.com/owner/repo`, 72 | message: `What is your plugin's GitHub repository URL?` 73 | }; 74 | const [errUrl, url] = await to(prompt(promptUrl)); 75 | handleError(`FAILED ON GITHUB URL`, errUrl); 76 | await shouldCancel(url); 77 | gitHubUrl = url.url; 78 | } 79 | 80 | spinner.start(`${yellow(`GITHUB ACTIONS`)} creating…`); 81 | handleTemplate(slug); 82 | spinner.succeed(`${green(`GITHUB ACTIONS`)} created`); 83 | 84 | const hasAssets = await downloadAssets(slug, spinner); 85 | finishLine(slug, gitHubUrl, hasAssets); 86 | })(); 87 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020-present Ahmad Awais. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a 6 | copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation 8 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | and/or sell copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wp-continuous-deployment", 3 | "version": "1.7.1", 4 | "description": "Continuous-Deployment for WordPress plugins with GitHub actions", 5 | "license": "MIT", 6 | "repository": "ahmadawais/wp-continuous-deployment", 7 | "author": { 8 | "name": "Ahmad Awais", 9 | "email": "me@AhmadAwais.com", 10 | "url": "https://twitter.com/MrAhmadAwais" 11 | }, 12 | "keywords": [ 13 | "wp-continuous-deployment", 14 | "Ahmad Awais", 15 | "ahmadawais" 16 | ], 17 | "bin": { 18 | "wp-continuous-deployment": "./index.js" 19 | }, 20 | "dependencies": { 21 | "@scarf/scarf": "^1.0.6", 22 | "arrify": "^2.0.1", 23 | "await-to-js": "^2.1.1", 24 | "axios": "^0.19.2", 25 | "chalk": "^3.0.0", 26 | "cli-welcome": "^1.4.0", 27 | "download": "^7.1.0", 28 | "enquirer": "^2.3.4", 29 | "get-urls": "^9.2.0", 30 | "git-remote-origin-url": "^3.1.0", 31 | "git-url-parse": "^11.1.2", 32 | "handlebars": "^4.7.3", 33 | "is-dir-empty": "^1.1.0", 34 | "is-it-git": "^1.1.0", 35 | "log-symbols": "^3.0.0", 36 | "make-dir": "^3.0.2", 37 | "ora": "^4.0.3" 38 | }, 39 | "devDependencies": { 40 | "clear-any-console": "^1.16.0" 41 | }, 42 | "scripts": { 43 | "start": "node index.js", 44 | "test": "node test.js", 45 | "sbx": "node ./utils/sbx.js", 46 | "clean": "rm -rf '.github' && rm -rf '.wordpress-org'" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # WP Continuous Deployment 2 | 3 | [![DOWNLOADS](https://img.shields.io/npm/dt/wp-continuous-deployment?label=DOWNLOADS%20%20❯&colorA=6A788D&colorB=6A788D&style=flat)](https://www.npmjs.com/package/wp-continuous-deployment) [![Learn VSCode](https://img.shields.io/badge/-VSCODE.pro%20%E2%86%92-gray.svg?colorB=6A788D&style=flat)](https://VSCode.pro/?utm_source=GitHubFOSS) 4 | [![Follow @MrAhmadAwais on Twitter](https://img.shields.io/badge/FOLLOW%20@MRAHMADAWAIS%20%E2%86%92-gray.svg?colorA=6A788D&colorB=6A788D&style=flat)](https://twitter.com/mrahmadawais/) 5 | 6 | > DevOps free Continuous-Deployment pipeline for WordPress plugins with GitHub Actions. 7 | 8 |
9 | 10 | [![📟](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/install.png)](./../../) 11 | 12 | ## Install 13 | 14 | ```sh 15 | npx wp-continuous-deployment 16 | ``` 17 | 18 |
19 | 20 | [![⚙️](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/usage.png)](./../../) 21 | 22 | ## Usage 23 | 24 | ### ❯ BEFORE 25 | 26 | 1. Make sure your plugin is on WordPress.org 27 | 2. Put your WordPress plugin on GitHub 28 | 3. Clone the GitHub repo in your PC and browse it with command line 29 | 4. Run `npx wp-console-deployment` in the root directory of the cloned GitHub repo 30 | 31 | ```sh 32 | npx wp-continuous-deployment 33 | ``` 34 | 35 | ### ❯ ONE-TIME SETUP 36 | 37 | - Follow the instructions, set the slug of your plugin which is the last part of the URL, e.g., for my plugin wordpress.org/plugins/cf7-customizer/ the slug is `cf7-customizer` 38 | - Add you WordPress.org SVN username/password (it's the same credentials you use for login.WordPress.org) in your plugin's GitHub repository settings. 39 | - Go to `https://github.com/owner/repo/settings/secrets` make sure to change the `owner/repo` part. 40 | 41 | 42 | ![secrets](https://on.ahmda.ws/3a3b87/c) 43 | 44 | ### ❯ AFTER 45 | 46 | 1. All your plugin assets must have been downloaded in the `.wordpress-org` directory 47 | 2. Now for each commit/push to master your assets & readme will get deployed (provided there are no other files modified. If other files are changed the build will be canceled) 48 | 3. And for each new tag/push, a new version of the plugin will be deployed 49 | 4. So, go ahead, make changes, git commit, and then run: `git tag 2.0.0 && git push --tags` — considering 2.0.0 is the new version 50 | 51 |
52 | 53 | [![📝](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/log.png)](changelog.md) 54 | 55 | ## Changelog 56 | 57 | [❯ Read the changelog here →](changelog.md) 58 | 59 |
60 | 61 | **KEY**: `📦 NEW`, `👌 IMPROVE`, `🐛 FIX`, `📖 DOC`, `🚀 RELEASE`, and `✅ TEST` 62 | 63 | > _I use [Emoji-log](https://github.com/ahmadawais/Emoji-Log), you should try it and simplify your git commits._ 64 | 65 | 66 | 67 |
68 | 69 | [![📃](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/license.png)](./../../) 70 | 71 | ## License & Conduct 72 | 73 | - MIT © [Ahmad Awais](https://twitter.com/MrAhmadAwais/) 74 | - [Code of Conduct](code-of-conduct.md) 75 | - Thank you, 10up & Helen for the awesome GitHub Actions 76 | 77 |
78 | 79 | [![🙌](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/connect.png)](./../../) 80 | 81 | ## Connect 82 | 83 |
84 |

GitHub @AhmadAwais (follow) To stay up to date on free & open-source software

85 |

Twitter @MrAhmadAwais (follow) To get #OneDevMinute daily hot tips & trolls

86 |

YouTube AhmadAwais (subscribe) To tech talks & #OneDevMinute videos

87 |

Blog: AhmadAwais.com (read) In-depth & long form technical articles

88 |

LinkedIn @MrAhmadAwais (connect) On the LinkedIn profile y'all

89 |
90 | 91 |
92 | 93 | [![👌](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/sponsor.png)](./../../) 94 | 95 | ## Sponsor 96 | 97 | Me ([Ahmad Awais](https://twitter.com/mrahmadawais/)) and my incredible wife ([Maedah Batool](https://twitter.com/MaedahBatool/)) are two engineers who fell in love with open source and then with each other. You can read more [about me here](https://ahmadawais.com/about). If you or your company use any of my projects or like what I’m doing then consider backing me. I'm in this for the long run. An open-source developer advocate. 98 | 99 | - 🌟 **$9.99/month (recommended)** ❯ [Two cups of Caffè latte (coffee) every month →](https://pay.paddle.com/checkout/540217) 100 | - 🚀 **$99.99 (one-time sponsor)** ❯ [Support an hour of open-source code →](https://pay.paddle.com/checkout/515568) 101 | - 🔰 **$49.99 (one-time sponsor)** ❯ [Support an hour of maintenance →](https://pay.paddle.com/checkout/527253) 102 | - ☕️ **$9.99 (one-time sponsor)** ❯ [Lunch/coffee →](https://pay.paddle.com/checkout/527254) 103 | 104 |
105 | 106 | Or you can back me by checking out my super fun video course. As developers, we spend over 200 Hrs/month with our code editors — it's only fair to learn your next editor deeply. This course will save you 15-20 hours every month. Become a VSCode Power User

107 | 108 |
VSCODE
109 | 110 |
111 | 112 | [![VSCode](https://img.shields.io/badge/-VSCode.pro%20%E2%86%92-gray.svg?colorB=4D2AFF&style=flat)](https://VSCode.pro/?utm_source=GitHubFOSS) 113 | [![Ahmad on Twitter](https://img.shields.io/twitter/follow/mrahmadawais.svg?style=social&label=Follow%20@MrAhmadAwais)](https://twitter.com/mrahmadawais/) 114 | -------------------------------------------------------------------------------- /template/assets.yml: -------------------------------------------------------------------------------- 1 | name: "👌 IMPROVE: Assets or readme" 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | master: 8 | name: "build" 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@master 12 | - name: WordPress.org plugin asset/readme update 13 | uses: 10up/action-wordpress-plugin-asset-update@master 14 | env: 15 | GITHUB_TOKEN: ${{{{raw-helper}}}}{{ secrets.GITHUB_TOKEN }}{{{{/raw-helper}}}} 16 | SVN_USERNAME: ${{{{raw-helper}}}}{{ secrets.SVN_USERNAME }}{{{{/raw-helper}}}} 17 | SVN_PASSWORD: ${{{{raw-helper}}}}{{ secrets.SVN_PASSWORD }}{{{{/raw-helper}}}} 18 | SLUG: "{{slug}}" 19 | -------------------------------------------------------------------------------- /template/release.yml: -------------------------------------------------------------------------------- 1 | name: "🚀 RELEASE: To WordPress.org" 2 | on: 3 | push: 4 | tags: 5 | - "*" 6 | jobs: 7 | tag: 8 | name: "build" 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@master 12 | - name: WordPress Plugin Deploy 13 | uses: 10up/action-wordpress-plugin-deploy@master 14 | env: 15 | GITHUB_TOKEN: ${{{{raw-helper}}}}{{ secrets.GITHUB_TOKEN }}{{{{/raw-helper}}}} 16 | SVN_USERNAME: ${{{{raw-helper}}}}{{ secrets.SVN_USERNAME }}{{{{/raw-helper}}}} 17 | SVN_PASSWORD: ${{{{raw-helper}}}}{{ secrets.SVN_PASSWORD }}{{{{/raw-helper}}}} 18 | SLUG: "{{slug}}" 19 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | const wpContinuousDeployment = require('./index.js'); 2 | 3 | wpContinuousDeployment(); 4 | -------------------------------------------------------------------------------- /utils/downloadAssets.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const chalk = require("chalk"); 3 | const axios = require("axios"); 4 | const green = chalk.bold.green; 5 | const yellow = chalk.bold.yellow; 6 | const arrify = require("arrify"); 7 | const getUrls = require("get-urls"); 8 | const download = require("download"); 9 | const to = require("await-to-js").default; 10 | const logSymbols = require("log-symbols"); 11 | const handleError = require("./handleError.js"); 12 | const isDirEmpty = require("is-dir-empty"); 13 | const dest = path.resolve(process.cwd(), "./.wordpress-org/"); 14 | 15 | module.exports = async (slug, spinner) => { 16 | spinner.start(`${yellow(`ASSETS`)} finding…`); 17 | const url = `https://ps.w.org/${slug}/assets/`; 18 | const [errRes, res] = await to(axios.get(url)); 19 | // handleError("FAILED ON ASSETS", errRes); // Not needed. 20 | 21 | if (errRes) { 22 | spinner.warn(`${yellow(`No ASSETS`)} found`); 23 | } else { 24 | const urlData = res.data.replace( 25 | /href="/g, 26 | `href="https://ps.w.org/${slug}/assets/` 27 | ); 28 | 29 | const getLinks = arrify(getUrls(urlData)); 30 | // Remove the first and last. 31 | const buildLinks = getLinks.slice(1, getLinks.length - 1); 32 | // Remove the languages link. 33 | const links = buildLinks.filter( 34 | link => link !== `https://ps.w.org/${slug}/assets/languages` 35 | ); 36 | 37 | spinner.succeed( 38 | `${green(`ASSETS`)} found ${links.length} asset${ 39 | links.length > 1 ? `s` : `` 40 | }` 41 | ); 42 | 43 | spinner.start(`${yellow(`ASSETS`)} downloading…`); 44 | const [errDown, down] = await to( 45 | Promise.all( 46 | links.map(async (link, i) => { 47 | await download(link, dest); 48 | spinner.start( 49 | `${yellow(`ASSETS`)} downloading ${i + 1}/${links.length}…` 50 | ); 51 | }) 52 | ) 53 | ); 54 | handleError("FAILED ON FILE DOWNLOADS", errDown); 55 | spinner.succeed( 56 | `${green(`ASSETS`)} downloaded ${links.length}/${links.length}` 57 | ); 58 | } 59 | // Check if assets were downloaded. 60 | const isEmpty = await isDirEmpty(dest); 61 | 62 | // Return true if not empty. 63 | return !isEmpty; 64 | }; 65 | -------------------------------------------------------------------------------- /utils/exitClone.js: -------------------------------------------------------------------------------- 1 | const logSymbols = require("log-symbols"); 2 | const chalk = require("chalk"); 3 | const green = chalk.bold.green; 4 | const red = chalk.bold.red; 5 | const yellow = chalk.bold.yellow; 6 | 7 | module.exports = clone => { 8 | if (!clone) { 9 | console.log(`${red(`${logSymbols.error} Nops. You're doing it wrong.`)}`); 10 | console.log( 11 | yellow(` 12 | ${logSymbols.info} Follow these steps: 13 | 14 | 1. Put your WordPress plugin on GitHub (https://repo.new) 15 | 2. Clone the GitHub repo in your PC and browse it with command line 16 | 3. Run ${green( 17 | `npx wp-console-deployment` 18 | )} in the root directory of the cloned repo 19 | `) 20 | ); 21 | process.exit(0); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /utils/finishLine.js: -------------------------------------------------------------------------------- 1 | const chalk = require("chalk"); 2 | const logSymbols = require("log-symbols"); 3 | const dim = chalk.dim; 4 | const green = chalk.bold.green; 5 | const yellow = chalk.bold.yellow; 6 | 7 | // Final notice. 8 | module.exports = (slug, url, hasAssets) => { 9 | console.log( 10 | `${logSymbols.success} ${green(`…and that was it.`)} ${yellow( 11 | `Wait, a couple more things to set up` 12 | )}` 13 | ); 14 | console.log(`\n${logSymbols.info} ${yellow(`One-time setup:`)} 15 | Remember the username and password you use at https://login.WordPress.org 16 | ❯❯ Go to ${dim(`${url}/settings/secrets`)} 17 | 1. Click "Add New Secret" add name ${green( 18 | `SVN_USERNAME` 19 | )} and fill the value with your username 20 | 2. Click "Add New Secret" again; add name ${green( 21 | `SVN_PASSWORD` 22 | )} and fill the value with your password`); 23 | 24 | console.log(`\n${logSymbols.success} ${green(`Now what?!`)}`); 25 | if (!hasAssets) { 26 | console.log( 27 | `- Make sure all plugin assets were downloaded to the ${green( 28 | `.wordpress-org` 29 | )} directory\n- Or manually download from ${dim( 30 | `https://ps.w.org/${slug}/` 31 | )} (if exists) ${dim(`assets`)} directory` 32 | ); 33 | } 34 | console.log(`- Now for each commit/push to master your assets & readme will get deployed 35 | - And for each new tag/push a new version of plugin will be deployed 36 | - So, go ahead, make change, git commit, and then run: 37 | 38 | ${green(`git tag 2.0.0 && git push --tags`)} 39 | ${dim(`# Considering 2.0.0 is the new version`)} 40 | `); 41 | }; 42 | -------------------------------------------------------------------------------- /utils/handleError.js: -------------------------------------------------------------------------------- 1 | const ora = require("ora"); 2 | const chalk = require("chalk"); 3 | const red = chalk.bold.red; 4 | const yellow = chalk.bold.yellow; 5 | const spinner = ora({ text: "" }); 6 | 7 | module.exports = (heading, err, displayError = true, exit = true) => { 8 | if (err) { 9 | console.log(); 10 | if (displayError) { 11 | spinner.fail(`${red(heading)}`); 12 | spinner.fail(`${red(`ERROR →`)} ${err.name}`); 13 | spinner.fail(`${red(`REASON →`)} ${err.message}`); 14 | spinner.fail(`${red(`ERROR STACK ↓ \n`)} ${err.stack}\n`); 15 | } else { 16 | spinner.warn(`${yellow(heading)}`); 17 | } 18 | if (exit) { 19 | process.exit(0); 20 | } else { 21 | return false; 22 | } 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /utils/handleTemplate.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const path = require("path"); 3 | const makeDir = require("make-dir"); 4 | const handlebars = require("handlebars"); 5 | handlebars.registerHelper("raw-helper", options => options.fn()); 6 | 7 | module.exports = async slug => { 8 | const files = [`assets`, `release`]; 9 | for (file of files) { 10 | const fileContents = fs.readFileSync( 11 | path.join(__dirname, `./../template/${file}.yml`), 12 | `utf8` 13 | ); 14 | const source = fileContents.toString(); 15 | const template = handlebars.compile(source); 16 | const rendered = template({ slug }); 17 | await makeDir(`./.github/workflows/`); 18 | await makeDir(`./.wordpress-org/`); 19 | const done = fs.writeFileSync( 20 | `./.github/workflows/${file}.yml`, 21 | rendered, 22 | `utf8` 23 | ); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /utils/query.js: -------------------------------------------------------------------------------- 1 | const shouldCancel = require("./shouldCancel.js"); 2 | 3 | export default (question, type) => { 4 | const query = new Toggle(question); 5 | const [err, res] = await to(query.run()); 6 | handleError(type, err); 7 | await shouldCancel(res); 8 | }; 9 | -------------------------------------------------------------------------------- /utils/sbx.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Makes the script crash on unhandled rejections instead of silently 4 | // ignoring them. In the future, promise rejections that are not handled will 5 | // terminate the Node.js process with a non-zero exit code. 6 | process.on("unhandledRejection", err => { 7 | console.log("err", err); 8 | }); 9 | const clearConsole = require("clear-any-console"); 10 | 11 | (async () => { 12 | clearConsole(); 13 | })(); 14 | -------------------------------------------------------------------------------- /utils/shouldCancel.js: -------------------------------------------------------------------------------- 1 | const chalk = require("chalk"); 2 | const yellow = chalk.bold.yellow; 3 | 4 | // Exit gracefully if user trying to cancel. 5 | module.exports = async action => { 6 | if (action === undefined) { 7 | console.log(yellow(`❯ Cancelled!\n`)); 8 | process.exit(0); 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /utils/welcome.js: -------------------------------------------------------------------------------- 1 | const pkg = require("./../package.json"); 2 | const welcome = require("cli-welcome"); 3 | 4 | module.exports = () => { 5 | // Use it. 6 | welcome( 7 | `WP Continuous Deployment`, 8 | ` 9 | by Awais.dev 👋`, 10 | { 11 | bgColor: `#d54e21`, 12 | color: `#000000`, 13 | bold: true, 14 | clear: true, 15 | version: `v${pkg.version}` 16 | } 17 | ); 18 | }; 19 | --------------------------------------------------------------------------------