diff --git a/build.sh b/build.sh index 3893d7f..54cf108 100755 --- a/build.sh +++ b/build.sh @@ -24,10 +24,13 @@ failscript() # Artifact to be released FILE=net.nuagenetworks.bambou.dll +PWD=`pwd` +alias DOCKER="docker run -e HTTPS_PROXY=$HTTPS_PROXY -e HTTP_PROXY=$HTTP_PROXY -v \"$PWD\":/build -w=/build mono:6.8" + # Build -nuget restore csharp-bambou.sln -sed -i "s/^.*AssemblyFileVersion.*$/[assembly: AssemblyFileVersion(\"$TAG\")]/g" csharp-bambou/Properties/AssemblyInfo.cs -xbuild /p:Configuration="Release" csharp-bambou.sln +DOCKER nuget restore csharp-bambou.sln +DOCKER sed -i "s/^.*AssemblyFileVersion.*$/[assembly: AssemblyFileVersion(\"$TAG\")]/g" csharp-bambou/Properties/AssemblyInfo.cs +DOCKER xbuild /p:Configuration="Release" csharp-bambou.sln #Create release on github RESPONSE=$(curl -H "Authorization: token $GITHUBTOKEN" -X POST -f -d '{"tag_name": "'$TAG'","target_commitish": "master", "name": "Bambou .NET '$TAG'","body": "Bambou library for .NET"}' https://api.github.com/repos/nuagenetworks/csharp-bambou/releases) @@ -38,8 +41,8 @@ UPLOAD_RESPONSE=$(curl -H "Authorization: token $GITHUBTOKEN" -X POST -f -H "Con # Build nuget package sed -i "s/VERSION_VAR/$TAG/g" package.nuspec -nuget pack package.nuspec +DOCKER nuget pack package.nuspec # Push to nuget -nuget push net.nuagenetworks.bambou.dll.$TAG.nupkg $NUGETTOKEN -Source https://www.nuget.org/api/v2/package +DOCKER nuget push net.nuagenetworks.bambou.dll.$TAG.nupkg $NUGETTOKEN -Source https://www.nuget.org/api/v2/package diff --git a/csharp-bambou/RestObject.cs b/csharp-bambou/RestObject.cs index ed1d18f..8b082f7 100644 --- a/csharp-bambou/RestObject.cs +++ b/csharp-bambou/RestObject.cs @@ -38,15 +38,6 @@ namespace net.nuagenetworks.bambou { public abstract class RestObject { - [JsonProperty("creationDate")] - protected String creationDate; - - [JsonProperty("lastUpdatedDate")] - protected String lastUpdatedDate; - - [JsonProperty("owner")] - protected String owner; - [JsonProperty("parentId")] protected String parentId; @@ -59,15 +50,9 @@ public abstract class RestObject [JsonProperty("id")] private String id; - [JsonIgnore] - public string NUCreationDate { get { return creationDate;} set { creationDate = value;} } [JsonIgnore] public string NUId { get { return id;} set { id = value;} } [JsonIgnore] - public string NULastUpdatedDate { get { return lastUpdatedDate;} set { lastUpdatedDate = value;} } - [JsonIgnore] - public string NUOwner { get { return owner;} set { owner = value;} } - [JsonIgnore] public string NUParentId { get { return parentId;} set { parentId = value; } } public Type NUParentType