Skip to content

Commit

Permalink
Prepare repository to be built by appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
elipriaulx committed Jan 29, 2019
1 parent 82dbde5 commit 5f8fd50
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
22 changes: 22 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 1.0.8.{build}
image: Visual Studio 2017
configuration: Release
assembly_info:
patch: true
file: '**\SharedAssemblyInfo.cs'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
before_build:
- ps: >-
./scripts/appveyor-prebuild.ps1
nuget restore "src\TumblThree\TumblThree.sln"
build:
project: src\TumblThree\TumblThree.sln
verbosity: normal
after_build:
- ps: ./scripts/appveyor-postbuild.ps1
artifacts:
- path: artifacts/*.zip
name: TumblThree
32 changes: 32 additions & 0 deletions scripts/appveyor-postbuild.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Harvest Data
$harvestPath = "$env:APPVEYOR_BUILD_FOLDER\src\TumblThree\TumblThree.Presentation\bin\Release"
$fileVersion = (Get-Item "$harvestPath\TumblThree.exe").VersionInfo.ProductVersion

# Artifacts Paths
$artifactsPath = "$env:APPVEYOR_BUILD_FOLDER\artifacts"
$applicationArtifactsPath = "$artifactsPath\Application\TumbleThree"
$translationArtifactsPath = "$artifactsPath\Translations\TumbleThree"

New-Item -ItemType Directory -Force -Path $applicationArtifactsPath
New-Item -ItemType Directory -Force -Path $translationArtifactsPath

# Copy in Application Artifacts
Get-ChildItem -Path "$harvestPath\*" -Include *.exe,*.dll,*.config | Copy-Item -Destination $applicationArtifactsPath
New-Item -ItemType Directory -Force -Path "$applicationArtifactsPath\en"
Get-ChildItem -Path "$harvestPath\en\*" | Copy-Item -Destination "$applicationArtifactsPath\en"

# Copy in Translation Artifacts
$translationFolders = dir -Directory $harvestPath
foreach ($tf in $translationFolders) {
$tfTarget = "$translationArtifactsPath\$tf"
New-Item -ItemType Directory -Force -Path "$tfTarget"
Get-ChildItem -Path "$harvestPath\$tf\*" | Copy-Item -Destination "$tfTarget"
}

# Zip Application
$applicationZipPath = "$artifactsPath\TumblThree-v$fileVersion-Application.zip"
Compress-Archive -Path "$artifactsPath\Application\TumbleThree\" -DestinationPath "$applicationZipPath"

# Zip Translations
$translationZipPath = "$artifactsPath\TumblThree-v$fileVersion-Translations.zip"
Compress-Archive -Path "$artifactsPath\Translations\TumbleThree\" -DestinationPath "$translationZipPath"
Empty file added scripts/appveyor-prebuild.ps1
Empty file.
4 changes: 2 additions & 2 deletions src/TumblThree/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.MainAssembly)]
[assembly: AssemblyVersion("1.0.8.68")]
[assembly: AssemblyFileVersion("1.0.8.68")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]

0 comments on commit 5f8fd50

Please sign in to comment.