Changeset 57758
- Timestamp:
- 03/04/2024 11:23:59 AM (6 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/callable-test-core-build-process.yml
r57655 r57758 63 63 run: npm ci 64 64 65 - name: Run Emoji precommit task 66 run: npm run grunt precommit:emoji 67 env: 68 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 69 65 70 - name: Build WordPress to run from ${{ inputs.directory }} 66 71 run: npm run build${{ inputs.directory == 'src' && ':dev' || '' }} -
trunk/Gruntfile.js
r57602 r57758 1048 1048 match: /\/\/ START: emoji arrays[\S\s]*\/\/ END: emoji arrays/g, 1049 1049 replacement: function() { 1050 var regex, files, 1050 var regex, files, ghCli, 1051 1051 partials, partialsSet, 1052 entities, emojiArray; 1052 entities, emojiArray, 1053 apiResponse, query; 1053 1054 1054 1055 grunt.log.writeln( 'Fetching list of Twemoji files...' ); 1055 1056 1057 // Ensure that the GitHub CLI is installed. 1058 ghCli = spawn( 'gh', [ '--version' ] ); 1059 if ( 0 !== ghCli.status ) { 1060 grunt.fatal( 'Emoji precommit script requires GitHub CLI. See https://cli.github.com/.' ); 1061 } 1062 1056 1063 // Fetch a list of the files that Twemoji supplies. 1057 files = spawn( 'svn', [ 'ls', 'https://github.com/twitter/twemoji.git/trunk/assets/svg' ] ); 1064 query = 'query={repository(owner: "jdecked", name: "twemoji") {object(expression: "v15.0.3:assets/svg") {... on Tree {entries {name}}}}}'; 1065 files = spawn( 'gh', [ 'api', 'graphql', '-f', query] ); 1066 1058 1067 if ( 0 !== files.status ) { 1059 1068 grunt.fatal( 'Unable to fetch Twemoji file list' ); 1060 1069 } 1061 1070 1062 entities = files.stdout.toString(); 1071 try { 1072 apiResponse = JSON.parse( files.stdout.toString() ); 1073 } catch ( e ) { 1074 grunt.fatal( 'Unable to parse Twemoji file list' ); 1075 } 1076 entities = apiResponse.data.repository.object.entries; 1077 entities = entities.reduce( function( accumulator, val ) { return accumulator + val.name + '\n'; }, '' ); 1063 1078 1064 1079 // Tidy up the file list.
Note: See TracChangeset
for help on using the changeset viewer.