Skip to content

Commit a0c31ee

Browse files
shanejonasBelfordZ
authored andcommitted
feature: build target file names + release order
1 parent d921b8f commit a0c31ee

File tree

5 files changed

+86
-86
lines changed

5 files changed

+86
-86
lines changed

BUILDING.md

+44-20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Project Building
1+
# Building
22

33
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here.
44

@@ -10,30 +10,34 @@ When using the name 'version' we mean the versioning scheme described in [VERSIO
1010

1111
This document is to describe the functionality a project MUST provide in terms of creating build artifacts. It also describes the structure in which project's MUST write build artifacts in.
1212

13-
We propose:
13+
a project MUST provide:
14+
1415
- a folder name convention for build artifacts
1516
- a folder structure for the above-mentioned build artifacts folder
16-
- a list of platforms we will target
17-
- Using docker-compose with a service for each build target
17+
- a list of targets
18+
- a file called `bin/build.{target}.{ext}` to target each of the build targets
1819
- a build pipeline given the above pretext
1920

2021
The purpose of having a uniform way of producing a build is that we may ALL produce builds for any of the projects, making the onramp for new developers less steep, while still maintaining an exceptionally high level of quality.
2122

22-
Further, the projects should adhere to the principles of 'architecture as code' - and should require a very minimal set of dependencies in order to contribute. That said, we have chose to center around docker for creating builds. Windows builds may be created using `wine`. If Wine is not an option, the standard may be broken to accomodate such cases.
23+
The projects should follow the 'architecture as code' principal - and should require a very minimal set of dependencies.
2324

2425
It is the responsibilty of the build tooling to write artifacts to the appropriate location as outlined in this specification.
2526

2627
## Build Folder Name
28+
2729
The cannonical folder for builds SHALL be named `build` and be located at the root of the project repository.
2830
Each project MUST `git ignore` the `build` folder.
2931

3032
## Build Folder Structure
33+
3134
Files and folder names MUST be lowercase.
3235
The result of the build process should create a folder structure as follows:
36+
3337
```
3438
.
3539
└── build
36-
└── {platform}
40+
└── {target}
3741
└── {project-name}.{ext}
3842
```
3943

@@ -46,25 +50,45 @@ Below is an example:
4650
└── my-build.exe
4751
```
4852

49-
## Build Platform Targets
50-
Below is a list of platforms we will target for each project
53+
## Build Targets
54+
55+
Below is a list of suggested targets for a project
5156
1. windows
5257
2. linux
53-
3. mac
58+
3. macos
59+
60+
## Build script
5461

55-
## Docker-compose to create a build
56-
Each project MUST have a /docker-compose.build.yml file.
57-
The result of this is that every project MUST produce a build for each target platform when the following command is invoked:
58-
- `docker-compose up -f ./docker-compose.build.yml`
62+
Each release target MUST have a `bin/build.{target}.{ext}` file.
5963

60-
The docker-compose.build.yml file MUST be placed in the project's root directory.
61-
Any dockerfiles used by the docker-compose may be placed at the discretion of the developer of the project.
64+
The result of this is that every project MUST produce a build for each target when the following command is invoked:
65+
66+
```
67+
bin/build.{target}.{ext}`
68+
```
69+
70+
The file MUST be placed in the project's `bin` directory.
6271

6372
## Build Pipeline
64-
Starting from clean master branch with latest HEAD
6573

66-
### Building all targets
67-
`docker-compose -f ./docker-compose.build.yml up` should create builds for each of the targeted platforms, and place the build artifacts in a folder structure outlined above.
74+
### Building targets
75+
76+
`bin/build.{target}.{ext}` should create builds for each of the targets, and place the build artifacts in a folder structure outlined above.
6877

69-
### Building specific target
70-
`docker-compose -f ./docker-compose.build.yml up [windows | linux | mac]`
78+
### Windows
79+
80+
```
81+
bin/build.windows.bat
82+
```
83+
84+
### Linux
85+
86+
```
87+
bin/build.linux.sh
88+
```
89+
90+
### Macos
91+
92+
```
93+
bin/build.macos.sh
94+
```

CONTRIBUTING.md

+6-15
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,22 @@ For small documentation changes and fixes, these can be done quickly following t
4040
### Submitting changes
4141

4242
1. Review & Test changes
43-
44-
If the code changed, then test it. If documentation changed, then preview the rendered Markdown.
45-
43+
* If the code changed, then test it. If documentation changed, then preview the rendered Markdown.
4644
2. Commiting
47-
48-
Follow the [Convention Commits](CONVENTIONAL_COMMITS.md) guidelines to create a commit message
49-
50-
45+
* Follow the [Convention Commits](CONVENTIONAL_COMMITS.md) guidelines to create a commit message
5146
3. Sign the CLA
52-
53-
Make sure you've signed the repository's Contributor License Agreement. We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once.
54-
55-
47+
* Make sure you've signed the repository's Contributor License Agreement. We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once.
5648
4. Submit a pull request
57-
58-
Push local changes to your forked repository and make a pull request. Follow the [Convention Commits](CONVENTIONAL_COMMITS.md) guidelines for naming Github pull requests and what to put in the body.
49+
* Push local changes to your forked repository and make a pull request. Follow the [Convention Commits](CONVENTIONAL_COMMITS.md) guidelines for naming Github pull requests and what to put in the body.
5950

6051

6152
## Building
6253

63-
Follow the build process is outlined in [the BUILDING spec](BUILDING.md) to create a build.
54+
Follow the build process is outlined in [BUILDING.md](BUILDING.md) to create a build.
6455

6556

6657
## Releasing
6758

68-
Follow the release process is outlined in [the RELEASING spec](RELEASING.md) to create a release.
59+
Follow the release process is outlined in [RELEASING.md](RELEASING.md) to create a release.
6960

7061

README.md

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Pristine
22

3-
Pristine is an open source repository in its original condition. Its goal is to be a starting point for new open source projects following a Documentation Driven Development pattern, as well as a resource from which to augment existing documentation.
3+
Pristine is an open source repository in its original condition.
4+
5+
There are a lack of repositories to start from to build community driven open source projects. Pristine is a starting point, it follows a Documentation Driven Development approach, and can be used as a resource to augment existing documentation.
46

57
## Documentation Driven Development
68

7-
There are many ways to drive open source development. Organizing solutions to this challenge around the README gives a middle ground between technical and non-technical specifications.
9+
There are many ways to drive open source development. Documenting the problem in the README gives a middle ground between technical and non-technical specifications. This allows organizing solutions to this challenge around community and documentation.
810

9-
> By the same principle a beautifully crafted library with no documentation is also damn near worthless. If your software solves the wrong problem or nobody can figure out how to use it, there’s something very bad going on.
11+
> [...] a beautifully crafted library with no documentation is also damn near worthless. If your software solves the wrong problem or nobody can figure out how to use it, there’s something very bad going on.
1012
1113
- [Readme Driven Development](http://tom.preston-werner.com/2010/08/23/readme-driven-development.html) by Tom Preson-Werner
1214

@@ -38,14 +40,5 @@ To get started, [fork](https://help.github.com/articles/fork-a-repo/) or [duplic
3840

3941
### Contributing
4042

41-
How to contribute, build and release are outlined in [CONTRIBUTING.md](CONTRIBUTING.md), [BUILDING.md](BUILDING.md) and [RELEASING.md](RELEASING.md) respectively.
42-
43-
### Requirements
44-
45-
#### Docker:
46-
47-
Docker is used as a building block in [BUILDING.md](BUILDING.md) and [RELEASING.md](RELEASING.md). Here are the resources needed to get started and install docker:
48-
49-
- [Install Docker Desktop for Mac](https://docs.docker.com/docker-for-mac/install/)
50-
- [Install Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/install/)
43+
How to contribute, build and release are outlined in [CONTRIBUTING.md](CONTRIBUTING.md), [BUILDING.md](BUILDING.md) and [RELEASING.md](RELEASING.md) respectively. Commits in this repository follow the [CONVENTIONAL_COMMITS.md](CONVENTIONAL_COMMITS.md) specification.
5144

RELEASING.md

+29-33
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Project Releasing
1+
# Releasing
22

33
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here.
44

@@ -16,54 +16,50 @@ We propose:
1616

1717
It is NOT the purpose of this document to describe how a project might create a build, NOR is it describing a strcture in which projects MUST write build artifacts to. It is describing the structure of the releases themselves.
1818

19-
## Release Targets
20-
1. Github
21-
2. (tentative) docker
22-
2319
## Release Pipeline
24-
The only parameter to the release pipeline is the new semver to use. We will refer to it as newVer.
25-
Starting from a clean branch:
2620

2721
### Create a build from current branch
28-
Process is outlined in [the BUILDING spec](building.md)
29-
in summary, we will simply:
22+
23+
Process is outlined in [BUILDING.md](BUILDING.md)
24+
3025
1. Clean the build directory
31-
2. run: `docker-compose up -f ./docker-compose.build.yml`
26+
2. run: `bin/build.{target}.{ext}`
3227

33-
### Sign the releases.
34-
- MUST be a pgp signature
35-
- MUST be the same pgp key as is registered with Github
36-
- MUST be a detached ascii-armored (.asc) signature
37-
- All files in the build folder MUST have an associated signature file
28+
### Bump the version of the project
29+
30+
Projects SHOULD automated the version bump following [CONVENTIONAL_COMMITS.md](CONVENTIONAL_COMMITS.md).
3831

3932
### Generate Changelog
40-
For our projects we will be using [conventional changelog](https://github.com/conventional-changelog/conventional-changelog).
4133

42-
1. Generate the changelog. EX: `conventional-changelog -p angular -i CHANGELOG.md -s -r 0`
43-
2. git add the changelog diff: `git add CHANGELOG.md`
34+
Projects SHOULD use generated changelogs from following [CONVENTIONAL_COMMITS.md](CONVENTIONAL_COMMITS.md).
4435

45-
### Bump the version of the project
46-
This is project specific.
36+
### Commit the bump + changelog update
4737

48-
use the convention outlined by [VERSIONING.md](VERSIONING.md):
49-
- `bin/bump-version.sh {newVer}`
38+
A project MUST generate a commit with the changes.
5039

51-
### Commit the bump + changelog update
52-
generate a commit with the changes.
40+
### Tag the commit with the bumped version
41+
42+
A project MUST be tagged with the semantic versioning scheme from [VERSIONING.md](VERSIONING.md).
43+
44+
### Sign the releases.
45+
46+
- MUST be a pgp signature
47+
- MUST be the same pgp key as is registered with Github
48+
- MUST be a detached ascii-armored (.asc) signature
49+
- All files in the build folder MUST have an associated signature file
5350

5451
### Push changelog & version bump
55-
simple as `git push`.
5652

5753
### Run Release Targets
54+
5855
For each of the desired release targets, prepare and push the release.
5956

60-
#### Github Release
61-
Using [Github release tool](https://github.com/c4milo/github-release), push a release with the following fields:
57+
#### Example Release Targets
58+
59+
1. Github
60+
2. Docker Hub
6261

62+
## Resources
6363

64-
| Field name | Content |
65-
| ---------------- | -------------------------------------------------------------- |
66-
| tag version | {newVer} |
67-
| title | same as tag |
68-
| description | {changelog for specific version} |
69-
| release binaries | for each platform: `{project-name}-{platform}-{version}.{ext}` |
64+
- [semantic-release](https://github.com/semantic-release/semantic-release)
65+
- [Conventional Commits](https://conventionalcommits.org/

VERSIONING.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It also describes standardized tooling around manipulating the version
1212
## Semver
1313
A project MUST use Semantic Versioning [semver](https://semver.org). Build metadata MAY NOT be used in a project. Build metadata SHOULD be ignored.
1414

15-
A Basic summary of Semantic Versioning taken from: [semver.org(https://semver.org)
15+
A Basic summary of Semantic Versioning taken from: [semver.org](https://semver.org)
1616

1717
### Summary:
1818

@@ -22,7 +22,3 @@ MAJOR version when you make incompatible API changes,
2222
MINOR version when you add functionality in a backwards-compatible manner, and
2323
PATCH version when you make backwards-compatible bug fixes.
2424
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
25-
26-
## Standardized tooling
27-
28-
each project should implement `bin/bump-version.sh {newVer}`

0 commit comments

Comments
 (0)