├── .gitignore ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── appveyor.yml ├── build-appveyor.cmd ├── build.cmd ├── build ├── package.nuspec ├── package.proj ├── package.xml └── tools │ ├── AppVeyorUmbraco │ └── AppVeyorUmbraco.Targets │ ├── MSBuildCommunityTasks │ ├── ICSharpCode.SharpZipLib.dll │ ├── MSBuild.Community.Tasks.Targets │ ├── MSBuild.Community.Tasks.chm │ ├── MSBuild.Community.Tasks.dll │ ├── MSBuild.Community.Tasks.xml │ └── Sample.proj │ ├── MSBuildNuGetTasks │ ├── MSBuild.NuGet.Tasks.Targets │ └── MSBuild.NuGet.Tasks.dll │ └── MSBuildUmbracoTasks │ ├── ICSharpCode.SharpZipLib.dll │ ├── MSBuild.Umbraco.Tasks.Targets │ └── MSBuild.Umbraco.Tasks.dll ├── docs ├── README.md ├── assets │ └── img │ │ └── logo.png └── developers-guide.md └── src ├── .nuget └── NuGet.exe ├── Our.Umbraco.UnVersion.Tests ├── Our.Umbraco.UnVersion.Tests.csproj ├── Properties │ └── AssemblyInfo.cs ├── Services │ └── UnVersionServiceTests.cs ├── TestHelper.cs ├── app.config └── packages.config ├── Our.Umbraco.UnVersion.sln └── Our.Umbraco.UnVersion ├── Our.Umbraco.UnVersion.csproj ├── Properties ├── AssemblyInfo.cs └── VersionInfo.cs ├── Services ├── IUnVersionService.cs └── UnVersionService.cs ├── UnVersionComponent.cs ├── UnVersionComposer.cs ├── UnVersionConfig.cs ├── Web └── UI │ └── Config │ └── unVersion.config ├── app.config └── packages.config /.gitignore: -------------------------------------------------------------------------------- 1 | _ReSharper.* 2 | [Bb]in/ 3 | [Oo]bj/ 4 | *.suo 5 | *.user 6 | *.userprefs 7 | *.cache 8 | *.orig 9 | Thumbs.db 10 | .DS_Store 11 | *.log 12 | .vs 13 | 14 | artifacts/ 15 | src/packages/*/** 16 | build/[Cc]onfig/ 17 | build/[Bb]in/ 18 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to this project 2 | 3 | Please take a moment to review this document in order to make the contribution 4 | process easy and effective for everyone involved. 5 | 6 | Following these guidelines helps to communicate that you respect the time of 7 | the developers managing and developing this open source project. In return, 8 | they should reciprocate that respect in addressing your issue or assessing 9 | patches and features. 10 | 11 | 12 | ## Using the issue tracker 13 | 14 | The issue tracker is the preferred channel for [bug reports](#bugs), 15 | [features requests](#features) and [submitting pull 16 | requests](#pull-requests), but please respect the following restrictions: 17 | 18 | * Please **do not** use the issue tracker for personal support requests (use 19 | [Our Umbraco](https://our.umbraco.org/projects/website-utilities/unversion/bugs-feedback-and-suggestions/) or Twitter). 20 | 21 | * Please **do not** derail or troll issues. Keep the discussion on topic and 22 | respect the opinions of others. 23 | 24 | 25 | 26 | ## Bug reports 27 | 28 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 29 | Good bug reports are extremely helpful - thank you! 30 | 31 | Guidelines for bug reports: 32 | 33 | 1. **Use the GitHub issue search** — check if the issue has already been 34 | reported. 35 | 36 | 2. **Check if the issue has been fixed** — try to reproduce it using the 37 | latest `master` or development branch in the repository. 38 | 39 | 3. **Isolate the problem** — create a reduced test 40 | case and a live example. 41 | 42 | A good bug report shouldn't leave others needing to chase you up for more 43 | information. Please try to be as detailed as possible in your report. What is 44 | your environment? What steps will reproduce the issue? What browser(s) and OS 45 | experience the problem? What would you expect to be the outcome? All these 46 | details will help people to fix any potential bugs. 47 | 48 | Example: 49 | 50 | > Short and descriptive example bug report title 51 | > 52 | > A summary of the issue and the browser/OS environment in which it occurs. If 53 | > suitable, include the steps required to reproduce the bug. 54 | > 55 | > 1. This is the first step 56 | > 2. This is the second step 57 | > 3. Further steps, etc. 58 | > 59 | > `` - a link to the reduced test case 60 | > 61 | > Any other information you want to share that is relevant to the issue being 62 | > reported. This might include the lines of code that you have identified as 63 | > causing the bug, and potential solutions (and your opinions on their 64 | > merits). 65 | 66 | 67 | 68 | ## Feature requests 69 | 70 | Feature requests are welcome. But take a moment to find out whether your idea 71 | fits with the scope and aims of the project. It's up to *you* to make a strong 72 | case to convince the project's developers of the merits of this feature. Please 73 | provide as much detail and context as possible. 74 | 75 | 76 | 77 | ## Pull requests 78 | 79 | Good pull requests - patches, improvements, new features - are a fantastic 80 | help. They should remain focused in scope and avoid containing unrelated 81 | commits. 82 | 83 | **Please ask first** before embarking on any significant pull request (e.g. 84 | implementing features, refactoring code, porting to a different language), 85 | otherwise you risk spending a lot of time working on something that the 86 | project's developers might not want to merge into the project. 87 | 88 | Please adhere to the coding conventions used throughout a project (indentation, 89 | accurate comments, etc.) and any other requirements (such as test coverage). 90 | 91 | Follow this process if you'd like your work considered for inclusion in the 92 | project: 93 | 94 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, 95 | and configure the remotes: 96 | 97 | ```bash 98 | # Clone your fork of the repo into the current directory 99 | git clone https://github.com// 100 | # Navigate to the newly cloned directory 101 | cd 102 | # Assign the original repo to a remote called "upstream" 103 | git remote add upstream https://github.com// 104 | ``` 105 | 106 | 2. If you cloned a while ago, get the latest changes from upstream: 107 | 108 | ```bash 109 | git checkout develop 110 | git pull upstream develop 111 | ``` 112 | 113 | 3. Create a new topic branch (off the main project `develop` branch) to 114 | contain your feature, change, or fix: 115 | 116 | ```bash 117 | git checkout -b 118 | ``` 119 | 120 | 4. Commit your changes in logical chunks. Please adhere to these [git commit 121 | message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 122 | or your code is unlikely be merged into the main project. Use Git's 123 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 124 | feature to tidy up your commits before making them public. 125 | 126 | 5. Locally merge (or rebase) the upstream development branch into your topic branch: 127 | 128 | ```bash 129 | git pull [--rebase] upstream develop 130 | ``` 131 | 132 | 6. Push your topic branch up to your fork: 133 | 134 | ```bash 135 | git push origin 136 | ``` 137 | 138 | 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) 139 | with a clear title and description. 140 | 141 | **IMPORTANT**: By submitting a patch, you agree to allow the project owner to 142 | license your work under the same license as that used by the project. -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2020 Søren Kottal, Our Umbraco and other contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnVersion 2 | 3 | [![Build status](https://img.shields.io/appveyor/ci/umco/umbraco-unversion.svg)](https://ci.appveyor.com/project/umco/umbraco-unversion) 4 | [![NuGet release](https://img.shields.io/nuget/v/Our.Umbraco.UnVersion.svg)](https://www.nuget.org/packages/Our.Umbraco.UnVersion) 5 | [![Our Umbraco project page](https://img.shields.io/badge/our-umbraco-orange.svg)](https://our.umbraco.org/projects/website-utilities/unversion/) 6 | 7 | 8 | This package automaticaly removes any previous versions for those times when a version history isn't important, and you don't want to take up the database space. 9 | 10 | 11 | ## Getting Started 12 | 13 | ### Installation 14 | 15 | > *Note:* UnVersion has been developed against **Umbraco v8.4.0** and will support that version and above. 16 | 17 | UnVersion can be installed from either Our Umbraco or NuGet package repositories, or build manually from the source-code: 18 | 19 | #### Our Umbraco package repository 20 | 21 | To install from Our Umbraco, please download the package from: 22 | 23 | > 24 | 25 | #### NuGet package repository 26 | 27 | To [install from NuGet](https://www.nuget.org/packages/Our.Umbraco.UnVersion), you can run the following command from within Visual Studio: 28 | 29 | PM> Install-Package Our.Umbraco.UnVersion 30 | 31 | We also have a [MyGet package repository](https://www.myget.org/gallery/umbraco-packages) - for bleeding-edge / development releases. 32 | 33 | #### Manual build 34 | 35 | If you prefer, you can compile UnVersion yourself, you'll need: 36 | 37 | * Visual Studio 2017 (or above) 38 | 39 | To clone it locally click the "Clone in Windows" button above or run the following git commands. 40 | 41 | git clone https://github.com/skttl/umbraco-unversion.git umbraco-unversion 42 | cd umbraco-unversion 43 | .\build.cmd 44 | 45 | --- 46 | 47 | ## Developers Guide 48 | 49 | For details on how to use the UnVersion package, please refer to our [Developers Guide](docs/developers-guide.md) documentation. 50 | 51 | --- 52 | 53 | ## Contributing to this project 54 | 55 | Anyone and everyone is welcome to contribute. Please take a moment to review the [guidelines for contributing](CONTRIBUTING.md). 56 | 57 | * [Bug reports](CONTRIBUTING.md#bugs) 58 | * [Feature requests](CONTRIBUTING.md#features) 59 | * [Pull requests](CONTRIBUTING.md#pull-requests) 60 | 61 | 62 | ## Contact 63 | 64 | Have a question? 65 | 66 | * [UnVersion Forum](https://our.umbraco.org/projects/website-utilities/unversion/bugs-feedback-and-suggestions/) on Our Umbraco 67 | * [Raise an issue](https://github.com/skttl/umbraco-unversion/issues) on GitHub 68 | 69 | 70 | ## Dev Team 71 | 72 | * [Søren Kottal](https://github.com/skttl) 73 | 74 | 75 | ## License 76 | 77 | Copyright © 2020 Søren Kottal, Our Umbraco and [other contributors](https://github.com/umco/umbraco-unversion/graphs/contributors) 78 | 79 | Copyright © 2012 Matt Brailsford, Our Umbraco and [other contributors](https://github.com/umco/umbraco-unversion/graphs/contributors) 80 | 81 | Licensed under the [MIT License](LICENSE.md) 82 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | image: Visual Studio 2017 2 | 3 | # version format 4 | version: 3.0.0.{build} 5 | 6 | # UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha 7 | # example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta 8 | init: 9 | - set UMBRACO_PACKAGE_PRERELEASE_SUFFIX= 10 | 11 | cache: 12 | - src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified 13 | 14 | before_build: 15 | - nuget restore src 16 | 17 | build_script: 18 | - build-appveyor.cmd 19 | 20 | artifacts: 21 | - path: artifacts\*.nupkg 22 | - path: artifacts\*.zip 23 | 24 | deploy: 25 | # MyGet Deployment for builds & releases 26 | - provider: NuGet 27 | server: https://www.myget.org/F/umbraco-packages/api/v2/package 28 | symbol_server: https://www.myget.org/F/umbraco-packages/symbols/api/v2/package 29 | api_key: 30 | secure: MopTO3Wq0dA16UdDqhP2GIzXLzZqS4SxGPCGiwN1i1hEL0AYLscuJVq6Ot7XYD2m 31 | artifact: /.*\.nupkg/ 32 | on: 33 | branch: develop 34 | 35 | # GitHub Deployment for releases 36 | - provider: GitHub 37 | auth_token: 38 | secure: Z9C0Mgv2YVEeAilwYB/x9jhPMyg73MSzKVviFSsHBYqjmV56ayWp/FMoEdspu3tE 39 | artifact: /.*\.zip/ # upload all Zip packages to release assets 40 | draft: false 41 | prerelease: false 42 | on: 43 | branch: master 44 | appveyor_repo_tag: true # deploy on tag push only 45 | 46 | # NuGet Deployment for releases 47 | - provider: NuGet 48 | server: 49 | skip_symbols: true 50 | api_key: 51 | secure: RYtJVVEuX1s2cy3Wo1Xly0yvp1n40wDdndhNsXQGgrAUmZDnlwujEycsLxUL8NsN 52 | artifact: /.*\.nupkg/ 53 | on: 54 | branch: master 55 | appveyor_repo_tag: true 56 | -------------------------------------------------------------------------------- /build-appveyor.cmd: -------------------------------------------------------------------------------- 1 | ECHO APPVEYOR_REPO_BRANCH: %APPVEYOR_REPO_BRANCH% 2 | ECHO APPVEYOR_REPO_TAG: %APPVEYOR_REPO_TAG% 3 | ECHO APPVEYOR_BUILD_NUMBER : %APPVEYOR_BUILD_NUMBER% 4 | ECHO APPVEYOR_BUILD_VERSION : %APPVEYOR_BUILD_VERSION% 5 | 6 | CALL src\.nuget\NuGet.exe restore src\Our.Umbraco.UnVersion.sln 7 | CALL "%programfiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\MsBuild.exe" build\package.proj -------------------------------------------------------------------------------- /build.cmd: -------------------------------------------------------------------------------- 1 | ECHO off 2 | 3 | SET /P APPVEYOR_BUILD_NUMBER=Please enter a build number (e.g. 134): 4 | SET /P PACKAGE_VERISON=Please enter your package version (e.g. 1.0.5): 5 | SET /P UMBRACO_PACKAGE_PRERELEASE_SUFFIX=Please enter your package release suffix or leave empty (e.g. beta): 6 | 7 | SET /P APPVEYOR_REPO_TAG=If you want to simulate a GitHub tag for a release (e.g. true): 8 | 9 | if "%APPVEYOR_BUILD_NUMBER%" == "" ( 10 | SET APPVEYOR_BUILD_NUMBER=100 11 | ) 12 | if "%PACKAGE_VERISON%" == "" ( 13 | SET PACKAGE_VERISON=0.0.0 14 | ) 15 | 16 | SET APPVEYOR_BUILD_VERSION=%PACKAGE_VERISON%.%APPVEYOR_BUILD_NUMBER% 17 | 18 | build-appveyor.cmd 19 | 20 | @IF %ERRORLEVEL% NEQ 0 GOTO err 21 | @EXIT /B 0 22 | :err 23 | @PAUSE 24 | @EXIT /B 1 -------------------------------------------------------------------------------- /build/package.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0.0.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /build/package.proj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | $(MSBuildProjectDirectory)\tools\MSBuildCommunityTasks 7 | $(MSBuildProjectDirectory)\tools\MSBuildUmbracoTasks 8 | $(MSBuildProjectDirectory)\tools\MSBuildNugetTasks 9 | $(MSBuildProjectDirectory)\tools\AppVeyorUmbraco 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Our.Umbraco.UnVersion 20 | UnVersion 21 | 8.4.0 22 | A content un-versioning package for Umbraco 8.4+ 23 | Søren Kottal, Matt Brailsford, Lee Kelleher 24 | https://github.com/skttl/umbraco-unversion/graphs/contributors 25 | MIT license 26 | http://opensource.org/licenses/MIT 27 | https://github.com/skttl/umbraco-unversion 28 | 29 | 30 | 31 | 32 | Our.Umbraco.UnVersion 33 | UnVersion for Umbraco 34 | Copyright © 2020 Søren Kottal, Our Umbraco and other contributors 35 | Søren Kottal, Matt Brailsford, Lee Kelleher 36 | https://raw.githubusercontent.com/skttl/umbraco-unversion/master/docs/assets/img/logo.png 37 | umbraco versioning 38 | en-GB 39 | false 40 | 41 | 42 | 43 | 44 | $(APPVEYOR_BUILD_VERSION) 45 | 46 | 47 | 48 | 49 | false 50 | 51 | 52 | 53 | 54 | true 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | true 63 | 64 | 65 | 66 | 67 | false 68 | 69 | 70 | 71 | 72 | 73 | 74 | Release 75 | $(MSBuildProjectDirectory)\.. 76 | $(MSBuildProjectDirectory)\_umbraco 77 | $(MSBuildProjectDirectory)\_nuget 78 | $(RootDir)\artifacts 79 | $(RootDir)\src\$(ProjectName) 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 193 | 194 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /build/package.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 0.0.0 7 | 8 | 9 | 10 | 0 11 | 0 12 | 0 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /build/tools/AppVeyorUmbraco/AppVeyorUmbraco.Targets: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /build/tools/MSBuildCommunityTasks/ICSharpCode.SharpZipLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skttl/umbraco-unversion/3ad56e5f7fc5838910d10bb3c5fe4e03059ac1c3/build/tools/MSBuildCommunityTasks/ICSharpCode.SharpZipLib.dll -------------------------------------------------------------------------------- /build/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.Targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(MSBuildExtensionsPath)\MSBuildCommunityTasks 7 | $(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.dll 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /build/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skttl/umbraco-unversion/3ad56e5f7fc5838910d10bb3c5fe4e03059ac1c3/build/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.chm -------------------------------------------------------------------------------- /build/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skttl/umbraco-unversion/3ad56e5f7fc5838910d10bb3c5fe4e03059ac1c3/build/tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.dll -------------------------------------------------------------------------------- /build/tools/MSBuildCommunityTasks/Sample.proj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 67 | 68 | 69 | 70 | 71 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 91 | 92 | 93 | 94 | 104 | 105 | 106 | 107 | list = new List(); 110 | list.Add("Happy"); 111 | list.Add("New"); 112 | list.Add("Year"); 113 | Console.WriteLine("Hello MSBuild Community Scripting World."); 114 | foreach(string s in list) 115 | { 116 | Console.WriteLine(s); 117 | } 118 | } 119 | ]]> 120 | 121 | 122 | 123 | 124 |