Compare commits
1 Commits
main
...
ci-generat
Author | SHA1 | Date |
---|---|---|
![]() |
d369c09265 |
|
@ -27,3 +27,20 @@ steps:
|
|||
- ./bazel-bin/swiftlint --progress --lenient
|
||||
- echo "+++ Post-cache SwiftLint Run"
|
||||
- ./bazel-bin/swiftlint --progress --lenient
|
||||
- label: "Generate Docs"
|
||||
commands:
|
||||
- echo "+++ Generate markdown docs"
|
||||
- bazel run swiftlint -- generate-docs
|
||||
- echo "--- Build Jazzy"
|
||||
- bazel build //tools:jazzy
|
||||
- echo "+++ Run Jazzy"
|
||||
- ./bazel-bin/tools/jazzy
|
||||
- echo "--- Validate Documentation Coverage"
|
||||
- |
|
||||
if ruby -rjson -e "j = JSON.parse(File.read('docs/undocumented.json')); exit j['warnings'].length != 0"; then
|
||||
echo "Undocumented declarations:"
|
||||
cat docs/undocumented.json
|
||||
exit 1
|
||||
fi
|
||||
- echo "+++ Deploy"
|
||||
- ./tools/push-docs
|
||||
|
|
|
@ -76,34 +76,3 @@ jobs:
|
|||
displayName: pod repo update
|
||||
- script: bundle exec pod lib lint --verbose
|
||||
displayName: pod lib lint
|
||||
|
||||
- job: jazzy
|
||||
pool:
|
||||
vmImage: 'macOS-12'
|
||||
variables:
|
||||
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
|
||||
steps:
|
||||
- script: swift run swiftlint generate-docs
|
||||
displayName: Run swiftlint generate-docs
|
||||
- script: bundle install --path vendor/bundle
|
||||
displayName: bundle install
|
||||
- script: bundle exec jazzy
|
||||
displayName: Run jazzy
|
||||
- script: >
|
||||
if ruby -rjson -e "j = JSON.parse(File.read('docs/undocumented.json')); exit j['warnings'].length != 0"; then
|
||||
echo "Undocumented declarations:"
|
||||
cat docs/undocumented.json
|
||||
exit 1
|
||||
fi
|
||||
displayName: Validate documentation coverage
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: 'API Docs'
|
||||
targetPath: 'docs'
|
||||
- task: DownloadSecureFile@1
|
||||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
|
||||
inputs:
|
||||
secureFile: doc_deploy_key
|
||||
- script: ./tools/push-docs
|
||||
displayName: Publish
|
||||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
|
||||
|
|
|
@ -7,3 +7,9 @@ ruby_binary(
|
|||
main = "@bundle//:bin/danger",
|
||||
deps = ["@bundle//:bin"],
|
||||
)
|
||||
|
||||
ruby_binary(
|
||||
name = "jazzy",
|
||||
main = "@bundle//:bin/jazzy",
|
||||
deps = ["@bundle//:bin"],
|
||||
)
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -p ~/.ssh && mv $DOWNLOADSECUREFILE_SECUREFILEPATH ~/.ssh/id_rsa
|
||||
chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
||||
if [[ $BUILDKITE_BRANCH != 'main' ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# TODO: Make this script compatible with Buildkite
|
||||
exit 1
|
||||
|
||||
source_sha="$(git rev-parse HEAD)"
|
||||
user="swiftlintbot@jpsim.com"
|
||||
|
@ -13,7 +16,6 @@ git clone git@github.com:realm/SwiftLint.git out
|
|||
cd out
|
||||
git checkout gh-pages
|
||||
git rm -rf .
|
||||
rm -rf Carthage
|
||||
cd ..
|
||||
|
||||
cp -a docs/. out/.
|
||||
|
|
Loading…
Reference in New Issue