Skip to content

Commit

Permalink
Appveyor build: attempt EmanueleCiriachi#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonytm committed Nov 27, 2020
1 parent 611a5b8 commit 26c74c8
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
42 changes: 42 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 1.0.0.{build}
assembly_info:
patch: true
file: AssemblyInfo.cs
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}-rc1'
artifacts:
- path: build\artifacts\*.update
name: TinyMCERTE
before_build:
- nuget sources add -Name SitecorePublicFeed -Source https://sitecore.myget.org/F/sc-packages/api/v3/index.json
- nuget sources add -Name SitecorePublicFeed2 -Source https://sitecore.myget.org/gallery/sc-packages
- nuget restore TinyMCERTE.sln
- SonarScanner.MSBuild.exe begin /k:"TinyMCERTE" /d:"sonar.host.url=https://sonarcloud.io" /d:"sonar.login=%sonar_token%" /n:"TinyMCERTE" /o:"antonytm-github" /d:"sonar.exclusions=Models/Autogenerated/**"
build:
project: TinyMCERTE.sln
after_build:
- SonarScanner.MSBuild.exe end /d:"sonar.login=%sonar_token%"
- ps: .\build\build.ps1
environment:
sonar_token:
secure: xT1FpsQcLjyehwDNkphemCQZOGIgPm8asR0BMqYtaG3+3u5FhFqFTm2QOBGaRzvY
deploy:
release: TinyMCERTE-v$(appveyor_build_version)
description: 'Tiny MCE in Sitecore'
provider: GitHub
auth_token:
secure: rkLSxUbN2YMMG/r6lzLq1PN0n07dqJBtk/8ZR2c/InGy0SBOsmqGXfIQWMQOZUAs
draft: false
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only
install:
- ps: Install-Module -Name Sitecore.Courier -Force
- ps: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- choco install sitecore-courier
- choco install "msbuild-sonarqube-runner" -y
- cd "sitecore\shell\Controls\Lib"
- ps: npm install
- cd ..
26 changes: 26 additions & 0 deletions build/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$version = $env:APPVEYOR_BUILD_VERSION
if ($version -eq $null) {
$version = "1.0.0"
}
"Package version: " + $version

cd "lighthouse tools"
npm install --save-dev
cd ..

Remove-Item build\package -Recurse -ErrorAction Ignore
Remove-Item build\artifacts -Recurse -ErrorAction Ignore
New-Item -Name build\package -ItemType directory
New-Item -Name build\artifacts -ItemType directory
New-Item -Name build\package\Data -ItemType directory
New-Item -Name build\package\bin -ItemType directory
New-Item -Name build\package\App_Config\Include -ItemType directory


Copy-Item .\Sitecore-TinyMCERTE\bin\Debug\TinyMCERTE* .\build\package\bin
Copy-Item .\App_Config\Include\TinyEditor.config .\build\package\App_Config\Include
Copy-Item .\App_Config\Include\TinyMce.FieldType.config .\build\package\App_Config\Include
Copy-Item .\serialization\* .\build\package\Data -recurse

$packageCmd = "Sitecore.Courier.Runner.exe -t build\package -o build\artifacts\sitecore.lighthouse." + $version + ".update -r"
iex $packageCmd

0 comments on commit 26c74c8

Please sign in to comment.