-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrunkbasedev.html
70 lines (61 loc) · 2.32 KB
/
trunkbasedev.html
1
2
3
4
5
6
7
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
<!DOCTYPE html>
<html>
<head>
<!-- Load the JS file -->
<script src="https://cdn.jsdelivr.net/npm/@gitgraph/js"></script>
</head>
<body>
<!-- DOM element in which we'll mount our graph -->
<div id="graph-container"></div>
<!-- Use the `GitgraphJS` global variable to create your graph -->
<script>
// Get the graph container HTML element.
const graphContainer = document.getElementById("graph-container");
const options = {
orientation: "vertical",
template: GitgraphJS.templateExtend ("metro", {
commit: {
message: {
displayHash: false,
displayAuthor: false
}
}
})
}
// Instantiate the graph.
const gitgraph = GitgraphJS.createGitgraph(graphContainer, options);
// Simulate git commands with Gitgraph API.
const master = gitgraph.branch("master");
master.commit("Init commit");
master.commit("Added README.md");
master.tag("1.0.0");
const FEATURE1 = gitgraph.branch("FEATURE-1");
const FEATURE2 = gitgraph.branch("FEATURE-2");
FEATURE1
.commit("Implement feature-1")
.commit("Fixes in feature-1");
FEATURE2.commit("Implement feature-2");
master.merge(FEATURE1).tag("1.1.0");
const FEATURE3 = gitgraph.branch("FEATURE-3");
const RELEASE11 = gitgraph.branch("RELEASE-20.2.3");
RELEASE11.commit("Fixed bug 1 found during regression").tag("1.1.1");
RELEASE11.commit("Fixed bug 2 found during regression <---------- Artifact from this commit goes to prod").tag("1.1.2");
master.merge(RELEASE11).tag("1.2.0");
FEATURE3
.commit("Implement feature-3")
.commit("Fixes in feature-3")
.commit("More fixes in feature-3")
.commit("Fixed!");
master.merge(FEATURE2).tag("1.3.0");
const RELEASE12 = gitgraph.branch("RELEASE-20.2.4");
RELEASE12
.commit("Fixed bug 1 found during regression").tag("1.3.1")
.commit("Fixed bug 2 found during regression").tag("1.3.2")
.commit("Fixed bug 3 found during regression").tag("1.3.3")
.commit("Fixed bug 4 found during regression").tag("1.3.4")
.commit("Fixed bug 4 found during regression <---------- Artifact from this commit goes to prod").tag("1.2.5")
master.merge(RELEASE12).tag("1.4.0");
master.merge(FEATURE3).tag("1.5.0");
</script>
</body>
</html>