2
0
Fork 0
mirror of https://github.com/mas-cli/mas synced 2025-03-06 23:57:21 +00:00

Merge pull request from rgoldberg/713-cleanup

Improve scripts, GitHub workflows & docs
This commit is contained in:
Ross Goldberg 2025-01-15 15:46:31 -05:00 committed by GitHub
commit 69e06d9e1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 26 additions and 19 deletions

View file

@ -21,7 +21,7 @@ jobs:
# Force all run commands to not use Rosetta 2
shell: arch -arm64 /bin/zsh -Negku {0}
steps:
- name: Checkout
- name: 🛒 Checkout repo
env:
GIT_CONFIG_COUNT: 1
GIT_CONFIG_KEY_0: init.defaultBranch
@ -31,17 +31,20 @@ jobs:
# Include all history & tags for script/version
fetch-depth: 0
- name: Setup repo
- name: 🔧 Setup repo
run: script/setup_workflow_repo
- name: Bootstrap
- name: 🛠 Select Xcode 16.2
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
- name: 👢 Bootstrap
run: script/bootstrap
- name: Build
- name: 🏗 Build
run: script/build build-test
- name: Test
- name: 🧪 Test
run: script/test
- name: Lint
- name: 🚨 Lint
run: script/lint

View file

@ -27,7 +27,7 @@ jobs:
- language: swift
build-mode: manual
steps:
- name: Checkout repository
- name: 🛒 Checkout repo
env:
GIT_CONFIG_COUNT: 1
GIT_CONFIG_KEY_0: init.defaultBranch
@ -37,23 +37,23 @@ jobs:
# Include all history & tags for script/version
fetch-depth: 0
- name: Setup repo
- name: 🔧 Setup repo
run: script/setup_workflow_repo
- name: Initialize CodeQL
- name: 🔩 Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{matrix.language}}
build-mode: ${{matrix.build-mode}}
queries: ${{matrix.language == 'swift' && '+security-and-quality' || ''}}
- name: Build Swift
- name: 🏗 Build Swift
if: matrix.language == 'swift'
shell: bash
run: |
script/build codeql
- name: Perform CodeQL Analysis
- name: 🔍 Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{matrix.language}}

View file

@ -60,10 +60,11 @@ jobs:
exit 3
fi
- name: 🛠 Select Xcode 16.2
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
- name: 📦 Build universal executable & package it in an installer
run: |
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
script/package package
run: script/package package
- name: 🚰 Bump custom tap formula
env:

View file

@ -13,6 +13,7 @@ disabled_rules:
# eventually enable
- file_header
- one_declaration_per_file
- prefer_key_path
- trailing_comma
# never enable
- contrasted_opening_brace

View file

@ -308,7 +308,7 @@ If mas doesn't work for you as expected (e.g. you can't install/upgrade apps), r
If the issue persists, please [file a bug](https://github.com/mas-cli/mas/issues/new).
All feedback is much appreciated! ✨
## Build from source
## 🏗 Build from source
You can build from Xcode by opening the root mas directory, or from the Terminal:
@ -318,7 +318,7 @@ script/build
Build output can be found in the `.build` directory within the project.
## Tests
## 🧪 Tests
Tests are written using [Quick](https://github.com/Quick/Quick) & [Nimble](https://github.com/Quick/Nimble).

View file

@ -3,11 +3,13 @@
# script/clean
# mas
#
# Deletes the build directory.
# Deletes the build directory & other generated files.
#
. "${0:a:h}/_setup_script"
printf $'==> 🗑 Cleaning mas %s\n' "$(script/version)"
swift package clean
swift package reset
rm -f Sources/mas/Package.swift

View file

@ -10,7 +10,7 @@
. "${0:a:h}/_setup_script"
printf $'==> 🚨 Formatting mas %s\n' "$(script/version)"
printf $'==> 🧹 Formatting mas %s\n' "$(script/version)"
for formatter in markdownlint prettier swift-format swiftformat swiftlint yamllint; do
if ! command -v "${formatter}" >/dev/null; then

View file

@ -8,7 +8,7 @@
. "${0:a:h}/_setup_script"
printf $'==> Testing mas %s\n' "$(script/version)"
printf $'==> 🧪 Testing mas %s\n' "$(script/version)"
script/generate_package_swift test