Skip to content

Commit

Permalink
Add gitlab-ci configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtualEvan committed Jul 19, 2019
1 parent 646ab3e commit 4a95bd0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
stages:
- compile
- release

variables:
assembly_extension: "dll"

compilation:
stage: compile
before_script:
- nuget restore
- mkdir $env:CI_PROJECT_NAME/lib
- wget https://gitlab.cern.ch/$env:CI_PROJECT_NAMESPACE/plugin/-/jobs/artifacts/master/raw/plugin/bin/Release/plugin.dll?job=compilation -OutFile $env:CI_PROJECT_NAME/lib/plugin.dll
script:
- msbuild /p:VersionAssembly=$env:CI_COMMIT_TAG /p:Configuration=Release $env:CI_PROJECT_NAME.sln
after_script:
- (Get-FileHash $env:CI_PROJECT_NAME/bin/Release/$env:CI_PROJECT_NAME.$env:ASSEMBLY_EXTENSION -Algorithm SHA1).Hash > $env:CI_PROJECT_NAME/bin/Release/$env:CI_PROJECT_NAME.$env:ASSEMBLY_EXTENSION.sha1
artifacts:
paths:
- $env:CI_PROJECT_NAME/bin/Release/$env:CI_PROJECT_NAME.$env:ASSEMBLY_EXTENSION
- $env:CI_PROJECT_NAME/bin/Release/$env:CI_PROJECT_NAME.$env:ASSEMBLY_EXTENSION.sha1
expire_in: 1 year

# This needs to be changed by GitLab
# Release creation should be 'keyword based'
release:
stage: release
only:
- tags
script:
# Create a release for the current tag
- CreateRelease
# Update "latest" release name the newest version number
- UpdateLatestRelease
5 changes: 3 additions & 2 deletions updates/IUpdates.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using plugin;
using System;
using System;
using WUApiLib;
using Newtonsoft.Json.Linq;
using System.Linq;
using System.Collections.Generic;
using Newtonsoft.Json;

using plugin;

namespace updates
{
[PluginAttribute(PluginName = "Updates")]
Expand Down

0 comments on commit 4a95bd0

Please sign in to comment.