Skip to content

Commit

Permalink
chore: fix release script (#785)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwwoda committed Jan 10, 2022
1 parent c61f08c commit b783619
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 22 deletions.
8 changes: 8 additions & 0 deletions Box.V2/Box.V2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
<DefineConstants>TRACE;RELEASE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'SignedRelease|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;RELEASE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>BoxSDKKey.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
Expand Down
39 changes: 21 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,30 @@ All notable changes to this project will be documented in this file. See [standa
* add file request api ([#777](https://github.com/box/box-windows-sdk-v2/issues/777)) ([1098f75](https://github.com/box/box-windows-sdk-v2/commit/1098f75983e2d784521f13b8d53df0e55d03203b))
* add vanity_name to SharedLink ([#782](https://github.com/box/box-windows-sdk-v2/issues/782)) ([00a1e26](https://github.com/box/box-windows-sdk-v2/commit/00a1e265569d76c2c9593aa259202d7febef629c))

## 4.0.0 [2021-11-02]
## [4.0.0](https://github.com/box/box-windows-sdk-v2/compare/v3.26.0...v4.0.0) (2021-11-02)

**Breaking changes:**
- Extract interfaces for BoxClient and Managers to improve testability ([#603](https://github.com/box/box-windows-sdk-v2/pull/603))
- Add BoxConfigBuilder and make BoxConfig immutable ([#737](https://github.com/box/box-windows-sdk-v2/pull/737))
- Expose tasks from async methods ([#742](https://github.com/box/box-windows-sdk-v2/pull/742))
- Use DateTimeOffset instead of DateTime ([#749](https://github.com/box/box-windows-sdk-v2/pull/749))
- Rework returned exceptions ([#753](https://github.com/box/box-windows-sdk-v2/pull/753))
- Upgrade .NET Standard to 2.0 ([#755](https://github.com/box/box-windows-sdk-v2/pull/755))

**New Features and Enhancements:**
- Add ability to get files under retention for assignment and file versions under retention for assignment ([#734](https://github.com/box/box-windows-sdk-v2/pull/734))
- Add `is_collaboration_restricted_to_enterprise` flag support for `Folder` update ([#732](https://github.com/box/box-windows-sdk-v2/pull/732))
- Replace insensitive language ([#738](https://github.com/box/box-windows-sdk-v2/pull/738))
- Add new, easier to use method for create terms of service user status ([#740](https://github.com/box/box-windows-sdk-v2/pull/740))
- Allow sort and direction parameter to be passed in when getting trashed items ([#754](https://github.com/box/box-windows-sdk-v2/pull/754))
- Add support for Task completion_rule field ([#758](https://github.com/box/box-windows-sdk-v2/pull/758))
- Add BoxSign API support ([#765](https://github.com/box/box-windows-sdk-v2/pull/765))
### **Breaking changes:**

**Bug Fixes:**
- Fix `Cannot access a closed Stream.Request` exception during upload ([#739](https://github.com/box/box-windows-sdk-v2/pull/739)) ([#757](https://github.com/box/box-windows-sdk-v2/pull/757))
* Extract interfaces for BoxClient and Managers to improve testability ([#603](https://github.com/box/box-windows-sdk-v2/pull/603))
* Add BoxConfigBuilder and make BoxConfig immutable ([#737](https://github.com/box/box-windows-sdk-v2/pull/737))
* Expose tasks from async methods ([#742](https://github.com/box/box-windows-sdk-v2/pull/742))
* Use DateTimeOffset instead of DateTime ([#749](https://github.com/box/box-windows-sdk-v2/pull/749))
* Rework returned exceptions ([#753](https://github.com/box/box-windows-sdk-v2/pull/753))
* Upgrade .NET Standard to 2.0 ([#755](https://github.com/box/box-windows-sdk-v2/pull/755))

### **New Features and Enhancements:**

* Add ability to get files under retention for assignment and file versions under retention for assignment ([#734](https://github.com/box/box-windows-sdk-v2/pull/734))
* Add `is_collaboration_restricted_to_enterprise` flag support for `Folder` update ([#732](https://github.com/box/box-windows-sdk-v2/pull/732))
* Replace insensitive language ([#738](https://github.com/box/box-windows-sdk-v2/pull/738))
* Add new, easier to use method for create terms of service user status ([#740](https://github.com/box/box-windows-sdk-v2/pull/740))
* Allow sort and direction parameter to be passed in when getting trashed items ([#754](https://github.com/box/box-windows-sdk-v2/pull/754))
* Add support for Task completion_rule field ([#758](https://github.com/box/box-windows-sdk-v2/pull/758))
* Add BoxSign API support ([#765](https://github.com/box/box-windows-sdk-v2/pull/765))

### **Bug Fixes:**
* Fix `Cannot access a closed Stream.Request` exception during upload ([#739](https://github.com/box/box-windows-sdk-v2/pull/739)) ([#757](https://github.com/box/box-windows-sdk-v2/pull/757))

## 3.26.0 [2021-04-01]

Expand Down
10 changes: 8 additions & 2 deletions build/bump_version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ if($DryRun){
git remote set-url origin $RepoLink
git config user.name $GithubUsername
git config user.email $GithubEmail
$lastBranch = git rev-parse --abbrev-ref HEAD
git branch -D $NEXT_VERSION_TAG
git checkout -b $NEXT_VERSION_TAG
git commit -am $NEXT_VERSION_TAG
$commitTitle = "chore: release " + $NEXT_VERSION_TAG
git commit -am $commitTitle
git push --set-upstream origin $NEXT_VERSION_TAG

$password = ConvertTo-SecureString "$GithubToken" -AsPlainText -Force
Expand All @@ -112,7 +114,7 @@ if($DryRun){
$prParams = @{
OwnerName = $REPO_OWNER
RepositoryName = $REPO_NAME
Title = "chore: release " + $NEXT_VERSION_TAG
Title = $commitTitle
Head = $NEXT_VERSION_TAG
Base = $Branch
Body = "Bumping version files for the next release! " + $NEXT_VERSION_TAG
Expand All @@ -121,6 +123,10 @@ if($DryRun){
New-GitHubPullRequest @prParams

Clear-GitHubAuthentication

git checkout $lastBranch
git pull
git branch -D $NEXT_VERSION_TAG
}

exit 0
5 changes: 3 additions & 2 deletions build/publish_framework_package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Param
function RemoveSensitiveData()
{
Remove-Item $PFX_PATH
Remove-Item SnInstallPfx.exe
certutil -csp "Microsoft Strong Cryptographic Provider" -key | Select-String -Pattern "VS_KEY" | ForEach-Object{ $_.ToString().Trim()} | ForEach-Object{ certutil -delkey -csp "Microsoft Strong Cryptographic Provider" $_}
Write-Output "Sensitive data removed."
}
Expand Down Expand Up @@ -117,7 +118,7 @@ $Bytes = [Convert]::FromBase64String($PfxAsBase64)

if($BuildAndTest){
nuget restore $SLN_PATH
msbuild $FRAMEWORK_PROJ_DIR /property:Configuration=Release
msbuild $FRAMEWORK_PROJ_DIR /property:Configuration=SignedRelease
if ($LASTEXITCODE -ne 0) {
Write-Output "Compilation failed. Aborting script."
RemoveSensitiveData
Expand All @@ -141,7 +142,7 @@ if($BuildAndTest){
###########################################################################

nuget restore $SLN_PATH
nuget pack $FRAMEWORK_PROJ_DIR -Build -Prop Configuration=Release
nuget pack $FRAMEWORK_PROJ_DIR -Build -Prop Configuration=SignedRelease
if ($LASTEXITCODE -ne 0) {
Write-Output "Package creation failed. Aborting script."
RemoveSensitiveData
Expand Down

0 comments on commit b783619

Please sign in to comment.