Skip to content

Commit 4a86244

Browse files
authored
Merge pull request #1 from umbraco/dev-v7
Latest master
2 parents 3d81c73 + 324cd7e commit 4a86244

File tree

3,842 files changed

+126368
-123783
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,842 files changed

+126368
-123783
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# editorconfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Default settings:
7+
# A newline ending every file
8+
# Use 4 spaces as indentation
9+
[*]
10+
insert_final_newline = true
11+
indent_style = space
12+
indent_size = 4
13+
14+
# Trim trailing whitespace, limited support.
15+
# https://github.com/editorconfig/editorconfig/wiki/Property-research:-Trim-trailing-spaces
16+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
*.doc diff=astextplain
2+
*.DOC diff=astextplain
3+
*.docx diff=astextplain
4+
*.DOCX diff=astextplain
5+
*.dot diff=astextplain
6+
*.DOT diff=astextplain
7+
*.pdf diff=astextplain
8+
*.PDF diff=astextplain
9+
*.rtf diff=astextplain
10+
*.RTF diff=astextplain
11+
12+
*.jpg binary
13+
*.png binary
14+
*.gif binary
15+
16+
*.cs text=auto diff=csharp
17+
*.vb text=auto
18+
*.c text=auto
19+
*.cpp text=auto
20+
*.cxx text=auto
21+
*.h text=auto
22+
*.hxx text=auto
23+
*.py text=auto
24+
*.rb text=auto
25+
*.java text=auto
26+
*.html text=auto
27+
*.htm text=auto
28+
*.css text=auto
29+
*.scss text=auto
30+
*.sass text=auto
31+
*.less text=auto
32+
*.js text=auto
33+
*.lisp text=auto
34+
*.clj text=auto
35+
*.sql text=auto
36+
*.php text=auto
37+
*.lua text=auto
38+
*.m text=auto
39+
*.asm text=auto
40+
*.erl text=auto
41+
*.fs text=auto
42+
*.fsx text=auto
43+
*.hs text=auto
44+
45+
*.csproj text=auto merge=union
46+
*.vbproj text=auto merge=union
47+
*.fsproj text=auto merge=union
48+
*.dbproj text=auto merge=union
49+
*.sln text=auto eol=crlf merge=union

.gitignore

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,7 @@ src/Umbraco.Web.UI/Web.*.config.transformed
4646

4747
umbraco/presentation/umbraco/plugins/uComponents/uComponentsInstaller.ascx
4848
umbraco/presentation/packages/uComponents/MultiNodePicker/CustomTreeService.asmx
49-
_BuildOutput/*
5049
*.ncrunchsolution
51-
build/UmbracoCms.AllBinaries*zip
52-
build/UmbracoCms.WebPI*zip
53-
build/UmbracoCms*zip
54-
build/UmbracoExamine.PDF*zip
55-
build/*.nupkg
5650
src/Umbraco.Tests/config/applications.config
5751
src/Umbraco.Tests/config/trees.config
5852
src/Umbraco.Web.UI/web.config
@@ -68,9 +62,9 @@ src/packages/repositories.config
6862

6963
src/Umbraco.Web.UI/[Ww]eb.config
7064
*.transformed
71-
webpihash.txt
7265

7366
node_modules
67+
lib-bower
7468

7569
src/Umbraco.Web.UI/[Uu]mbraco/[Ll]ib/*
7670
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/umbraco.*
@@ -95,7 +89,6 @@ src/Umbraco.Web.UI/[Uu]mbraco/[Aa]ssets/*
9589
src/Umbraco.Web.UI.Client/[Bb]uild/*
9690
src/Umbraco.Web.UI.Client/[Bb]uild/[Bb]elle/
9791
src/Umbraco.Web.UI/[Uu]ser[Cc]ontrols/
98-
build/_BuildOutput/
9992
src/Umbraco.Web.UI.Client/src/[Ll]ess/*.css
10093
tools/NDepend/
10194

@@ -120,6 +113,7 @@ build/ApiDocs/*
120113
build/ApiDocs/Output/*
121114
src/Umbraco.Web.UI.Client/bower_components/*
122115
/src/Umbraco.Web.UI/Umbraco/preview
116+
/src/Umbraco.Web.UI/Umbraco/preview.old
123117

124118
#Ignore Rule for output of generated documentation files from Grunt docserve
125119
src/Umbraco.Web.UI.Client/docs/api
@@ -130,7 +124,6 @@ src/*.boltdata/
130124
/src/Umbraco.Web.UI/Umbraco/Js/canvasdesigner.config.js
131125
/src/Umbraco.Web.UI/Umbraco/Js/canvasdesigner.front.js
132126
src/umbraco.sln.ide/*
133-
build/UmbracoCms.*/
134127
src/.vs/
135128
src/Umbraco.Web.UI/umbraco/js/install.loader.js
136129
src/Umbraco.Tests/media
@@ -140,5 +133,12 @@ apidocs/api/*
140133
build/docs.zip
141134
build/ui-docs.zip
142135
build/csharp-docs.zip
143-
build/msbuild.log
144136
.vs/
137+
src/packages/
138+
src/PrecompiledWeb/*
139+
140+
141+
build.out/
142+
build.tmp/
143+
build/Modules/*/temp/
144+
/src/.idea/*

BUILD.md

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
Umbraco Cms Build
2+
--
3+
----
4+
5+
# Quick!
6+
7+
To build Umbraco, fire PowerShell and move to Umbraco's repository root (the directory that contains `src`, `build`, `README.md`...). There, trigger the build with the following command:
8+
9+
build\build.ps1
10+
11+
By default, this builds the current version. It is possible to specify a different version as a parameter to the build script:
12+
13+
build\build.ps1 7.6.44
14+
15+
Valid version strings are defined in the `Set-UmbracoVersion` documentation below.
16+
17+
## PowerShell Quirks
18+
19+
There is a good chance that running `build.ps1` ends up in error, with messages such as
20+
21+
>The file ...\build\build.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies.
22+
23+
PowerShell has *Execution Policies* that may prevent the script from running. You can check the current policies with:
24+
25+
PS> Get-ExecutionPolicy -List
26+
27+
Scope ExecutionPolicy
28+
----- ---------------
29+
MachinePolicy Undefined
30+
UserPolicy Undefined
31+
Process Undefined
32+
CurrentUser Undefined
33+
LocalMachine RemoteSigned
34+
35+
Policies can be `Restricted`, `AllSigned`, `RemoteSigned`, `Unrestricted` and `Bypass`. Scopes can be `MachinePolicy`, `UserPolicy`, `Process`, `CurrentUser`, `LocalMachine`. You need the current policy to be `RemoteSigned`—as long as it is `Undefined`, the script cannot run. You can change the current user policy with:
36+
37+
PS> Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
38+
39+
Alternatively, you can do it at machine level, from within an elevated PowerShell session:
40+
41+
PS> Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned
42+
43+
And *then* the script should run. It *might* however still complain about executing scripts, with messages such as:
44+
45+
>Security warning - Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run ...\build\build.ps1?
46+
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):
47+
48+
This is usually caused by the scripts being *blocked*. And that usually happens when the source code has been downloaded as a Zip file. When Windows downloads Zip files, they are marked as *blocked* (technically, they have a Zone.Identifier alternate data stream, with a value of "3" to indicate that they were downloaded from the Internet). And when such a Zip file is un-zipped, each and every single file is also marked as blocked.
49+
50+
The best solution is to unblock the Zip file before un-zipping: right-click the files, open *Properties*, and there should be a *Unblock* checkbox at the bottom of the dialog. If, however, the Zip file has already been un-zipped, it is possible to recursively unblock all files from PowerShell with:
51+
52+
PS> Get-ChildItem -Recurse *.* | Unblock-File
53+
54+
## Notes
55+
56+
Git might have issues dealing with long file paths during build. You may want/need to enable `core.longpaths` support (see [this page](https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path) for details).
57+
58+
# Build
59+
60+
The Umbraco Build solution relies on a PowerShell module. The module needs to be imported into PowerShell. From within Umbraco's repository root:
61+
62+
build\build.ps1 -ModuleOnly
63+
64+
Or the abbreviated form:
65+
66+
build\build.ps1 -mo
67+
68+
Once the module has been imported, a set of commands are added to PowerShell.
69+
70+
## Get-UmbracoBuildEnv
71+
72+
Gets the Umbraco build environment ie NuGet, Semver, Visual Studio, etc. Downloads things that can be downloaded such as NuGet. Examples:
73+
74+
$uenv = Get-UmbracoBuildEnv
75+
Write-Host $uenv.SolutionRoot
76+
&$uenv.NuGet help
77+
78+
The object exposes the following properties:
79+
80+
* `SolutionRoot`: the absolute path to the solution root
81+
* `VisualStudio`: a Visual Studio object (see below)
82+
* `NuGet`: the absolute path to the NuGet executable
83+
* `Zip`: the absolute path to the 7Zip executable
84+
* `VsWhere`: the absolute path to the VsWhere executable
85+
* `NodePath`: the absolute path to the Node install
86+
* `NpmPath`: the absolute path to the Npm install
87+
88+
The Visual Studio object is `null` when Visual Studio has not been detected (eg on VSTS). When not null, the object exposes the following properties:
89+
90+
* `Path`: Visual Studio installation path (eg some place under `Program Files`)
91+
* `Major`: Visual Studio major version (eg `15` for VS 2017)
92+
* `Minor`: Visual Studio minor version
93+
* `MsBUild`: the absolute path to the MsBuild executable
94+
95+
## Get-UmbracoVersion
96+
97+
Gets an object representing the current Umbraco version. Example:
98+
99+
$v = Get-UmbracoVersion
100+
Write-Host $v.Semver
101+
102+
The object exposes the following properties:
103+
104+
* `Semver`: the semver object representing the version
105+
* `Release`: the main part of the version (eg `7.6.33`)
106+
* `Comment`: the pre release part of the version (eg `alpha02`)
107+
* `Build`: the build number part of the version (eg `1234`)
108+
109+
## Set-UmbracoVersion
110+
111+
Modifies Umbraco files with the new version.
112+
113+
>This entirely replaces the legacy `UmbracoVersion.txt` file.
114+
115+
The version must be a valid semver version. It can include a *pre release* part (eg `alpha02`) and/or a *build number* (eg `1234`). Examples:
116+
117+
Set-UmbracoVersion 7.6.33
118+
Set-UmbracoVersion 7.6.33-alpha02
119+
Set-UmbracoVersion 7.6.33+1234
120+
Set-UmbracoVersion 7.6.33-beta05+5678
121+
122+
Note that `Set-UmbracoVersion` enforces a slightly more restrictive naming scheme than what semver would tolerate. The pre release part can only be composed of a-z and 0-9, therefore `alpha033` is considered valid but not `alpha.033` nor `alpha033-preview` nor `RC2` (would need to be lowercased `rc2`).
123+
124+
>It is considered best to add trailing zeroes to pre releases, else NuGet gets the order of versions wrong. So if you plan to have more than 10, but no more that 100 alpha versions, number the versions `alpha00`, `alpha01`, etc.
125+
126+
## Build-Umbraco
127+
128+
Builds Umbraco. Temporary files are generated in `build.tmp` while the actual artifacts (zip files, NuGet packages...) are produced in `build.out`. Example:
129+
130+
Build-Umbraco
131+
132+
Some log files, such as MsBuild logs, are produced in `build.tmp` too. The `build` directory should remain clean during a build.
133+
134+
### web.config
135+
136+
Building Umbraco requires a clean `web.config` file in the `Umbraco.Web.UI` project. If a `web.config` file already exists, the `pre-build` task (see below) will save it as `web.config.temp-build` and replace it with a clean copy of `web.Template.config`. The original file is replaced once it is safe to do so, by the `pre-packages` task.
137+
138+
## Build-UmbracoDocs
139+
140+
Builds umbraco documentation. Temporary files are generated in `build.tmp` while the actual artifacts (docs...) are produced in `build.out`. Example:
141+
142+
Build-UmbracoDocs
143+
144+
Some log files, such as MsBuild logs, are produced in `build.tmp` too. The `build` directory should remain clean during a build.
145+
146+
## Verify-NuGet
147+
148+
Verifies that projects all require the same version of their dependencies, and that NuSpec files require versions that are consistent with projects. Example:
149+
150+
Verify-NuGet
151+
152+
# VSTS
153+
154+
Continuous integration, nightly builds and release builds run on VSTS.
155+
156+
VSTS uses the `Build-Umbraco` command several times, each time passing a different *target* parameter. The supported targets are:
157+
158+
* `pre-build`: prepares the build
159+
* `compile-belle`: compiles Belle
160+
* `compile-umbraco`: compiles Umbraco
161+
* `pre-tests`: prepares the tests
162+
* `compile-tests`: compiles the tests
163+
* `pre-packages`: prepares the packages
164+
* `pkg-zip`: creates the zip files
165+
* `pre-nuget`: prepares NuGet packages
166+
* `pkg-nuget`: creates NuGet packages
167+
168+
All these targets are executed when `Build-Umbraco` is invoked without a parameter (or with the `all` parameter). On VSTS, compilations (of Umbraco and tests) are performed by dedicated VSTS tasks. Similarly, creating the NuGet packages is also performed by dedicated VSTS tasks.
169+
170+
Finally, the produced artifacts are published in two containers that can be downloaded from VSTS: `zips` contains the zip files while `nuget` contains the NuGet packages.
171+
172+
>During a VSTS build, some environment `UMBRACO_*` variables are exported by the `pre-build` target and can be reused in other targets *and* in VSTS tasks. The `UMBRACO_TMP` environment variable is used in `Umbraco.Tests` to disable some tests that have issues with VSTS at the moment.
173+
174+
# Notes
175+
176+
*This part needs to be cleaned up*
177+
178+
Nightlies should use some sort of build number.
179+
180+
We should increment versions as soon as a version is released. Ie, as soon as `7.6.33` is released, we should `Set-UmbracoVersion 7.6.34-alpha` and push.
181+
182+
NuGet / NuSpec consistency checks are performed in tests. We should move it so it is done as part of the PowerShell script even before we try to compile and run the tests.
183+
184+
There are still a few commands in `build` (to build docs, install Git or cleanup the install) that will need to be migrated to PowerShell.
185+
186+
/eof

CODE_OF_CONDUCT.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Code of Conduct
2+
3+
## 1. Purpose
4+
5+
A primary goal of Umbraco CMS is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
6+
7+
This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
8+
9+
We invite all those who participate in Umbraco CMS to help us create safe and positive experiences for everyone.
10+
11+
## 2. Open Source Citizenship
12+
13+
A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
14+
15+
Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
16+
17+
If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
18+
19+
## 3. Expected Behavior
20+
21+
The following behaviors are expected and requested of all community members:
22+
23+
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
24+
* Exercise consideration and respect in your speech and actions.
25+
* Attempt collaboration before conflict.
26+
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
27+
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
28+
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
29+
30+
## 4. Unacceptable Behavior
31+
32+
The following behaviors are considered harassment and are unacceptable within our community:
33+
34+
* Violence, threats of violence or violent language directed against another person.
35+
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
36+
* Posting or displaying sexually explicit or violent material.
37+
* Posting or threatening to post other people’s personally identifying information ("doxing").
38+
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
39+
* Inappropriate photography or recording.
40+
* Inappropriate physical contact. You should have someone’s consent before touching them.
41+
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
42+
* Deliberate intimidation, stalking or following (online or in person).
43+
* Advocating for, or encouraging, any of the above behavior.
44+
* Sustained disruption of community events, including talks and presentations.
45+
46+
## 5. Consequences of Unacceptable Behavior
47+
48+
Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
49+
50+
Anyone asked to stop unacceptable behavior is expected to comply immediately.
51+
52+
If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
53+
54+
## 6. Reporting Guidelines
55+
56+
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. Please contact Sebastiaan Janssen - [[email protected]](mailto:[email protected]).
57+
58+
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
59+
60+
## 7. Addressing Grievances
61+
62+
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Umbraco with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
63+
64+
## 8. Scope
65+
66+
We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business.
67+
68+
This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
69+
70+
## 9. Contact info
71+
72+
Sebastiaan Janssen - [[email protected]](mailto:[email protected])
73+
74+
## 10. License and attribution
75+
76+
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
77+
78+
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
79+
80+
Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)

0 commit comments

Comments
 (0)