Merge pull request #2 from valet-customers/format

Format Ruby code blocks
This commit is contained in:
Matisse Hack
2022-06-17 14:51:55 -07:00
committed by GitHub
4 changed files with 20 additions and 23 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ You will use the codespace preconfigured in this repository to perform the audit
3. Now, from the `valet` folder in your repository, run Valet to verify your Azure DevOps configuration: 3. Now, from the `valet` folder in your repository, run Valet to verify your Azure DevOps configuration:
``` ```
gh valet audit azure-devops --output-dir . gh valet audit azure-devops --output-dir audit
``` ```
### Example ### Example
![valet-audit-1](https://user-images.githubusercontent.com/26442605/169615028-696dad13-ff83-41a7-b475-0ab8c0bbcd65.png) ![valet-audit-1](https://user-images.githubusercontent.com/26442605/169615028-696dad13-ff83-41a7-b475-0ab8c0bbcd65.png)
+1 -1
View File
@@ -42,7 +42,7 @@ You will use the codespace preconfigured in this repository to perform the dry r
2. Verify you are in the `valet` directory 2. Verify you are in the `valet` directory
``` ```
gh valet dry-run azure-devops pipeline --pipeline-id PIPELINE-ID --output-dir dry-runs gh valet dry-run azure-devops pipeline --pipeline-id PIPELINE-ID --output-dir dry-run
``` ```
3. Now, from the `valet` folder in your repository, run `gh valet dry-run` to see the output: 3. Now, from the `valet` folder in your repository, run `gh valet dry-run` to see the output:
+4 -7
View File
@@ -63,25 +63,22 @@ Add the following code to the ruby file:
``` Ruby ``` Ruby
transform "DotNetCoreCLI@2" do |item| transform "DotNetCoreCLI@2" do |item|
projects = item["projects"] projects = item["projects"]
command = item['command'] command = item["command"]
run_command = [] run_command = []
if(projects.include?("$")) if projects.include?("$")
if(command.nil?) command = "build" if command.nil?
command = "build"
end
run_command << "shopt -s globstar; for f in ./**/*.csproj; do dotnet #{command} $f #{item['arguments']} ; done" run_command << "shopt -s globstar; for f in ./**/*.csproj; do dotnet #{command} $f #{item['arguments']} ; done"
else else
run_command << "dotnet #{command} #{item['projects']} #{item['arguments']}" run_command << "dotnet #{command} #{item['projects']} #{item['arguments']}"
end end
{ {
shell: "bash", shell: "bash",
run: run_command.join("\n") run: run_command.join("\n")
} }
end end
``` ```
### Example
![mapper-ex1](https://user-images.githubusercontent.com/26442605/161116232-c3dab5ba-8ca5-4dd0-a659-b871646ab82f.png)
Run the `migrate` command with the transformer again and pass it the custom plugin. Look at the result and see if it results in a successful build. Run the `migrate` command with the transformer again and pass it the custom plugin. Look at the result and see if it results in a successful build.
+1 -1
View File
@@ -48,7 +48,7 @@ You will use the codespace preconfigured in this repository to perform the migra
4. Now, from the `./valet` folder in your repository, run `valet migrate` to migrate the pipeline to GitHub Actions. 4. Now, from the `./valet` folder in your repository, run `valet migrate` to migrate the pipeline to GitHub Actions.
``` ```
cd valet cd valet
gh valet migrate azure-devops pipeline --target-url https://github.com/GITHUB-ORG/GITHUB-REPO --pipeline-id PIPELINE-ID --output-dir migrations gh valet migrate azure-devops pipeline --target-url https://github.com/GITHUB-ORG/GITHUB-REPO --pipeline-id PIPELINE-ID --output-dir migrate
``` ```
### Example ### Example