7 Commits
v1.1 ... v1.2

Author SHA1 Message Date
Tim Shannon
ddbcb8fc6e Fixed last release file issue
trimmed logs in tables some more
2016-04-25 21:39:11 +00:00
Tim Shannon
6bca816d11 Changed log view formatting in tables a bit 2016-04-25 21:09:16 +00:00
Tim Shannon
a4be249b2c Added time took to release log statement
Changed release file name handling to only include the base of the file
path.
2016-04-25 21:02:01 +00:00
Tim Shannon
0f165681ac Added pre-version version
No fetch and load errors can be properly seen without having to run
ironsmith manually.
2016-04-25 19:41:03 +00:00
Tim Shannon
219efef570 Another small change in the same code 2016-04-25 16:56:48 +00:00
Tim Shannon
92a8045e13 Fixed issue with new projects
If they haven't done a single poll the UI was filing to find a last
version.
2016-04-25 16:51:01 +00:00
Tim Shannon
1368f8aa50 Testing git hooks with ironsmith 2016-04-25 15:44:04 +00:00
8 changed files with 22 additions and 13 deletions

@@ -14,7 +14,7 @@ You'll setup a project which will need the following information:
2. Script to build the repository
3. Script to test the repository
4. Script to build the release file
5. Path to the release file
5. Path to the release file / can also be a script that returns a file name
6. Script to set release name / version
An optional set of environment strings can be set to define the environment in which the scripts run.

File diff suppressed because one or more lines are too long

@@ -1,3 +1,2 @@
#!/bin/bash
go-bindata web/... && go build -a -v -o ironsmith

@@ -32,7 +32,8 @@ func (p *Project) load() {
defer p.processing.Unlock()
p.setStage(stageLoad)
p.setVersion("")
p.setVersion("Version not yet set")
p.start = time.Time{}
if p.filename == "" {
p.errHandled(errors.New("Invalid project file name"))
@@ -82,6 +83,7 @@ func (p *Project) load() {
// fetched code, if there is then the temp dir is renamed to the version name
func (p *Project) fetch() {
p.setStage(stageFetch)
p.start = time.Now()
if p.Fetch == "" {
return
@@ -216,14 +218,15 @@ func (p *Project) release() {
return
}
if p.errHandled(p.ds.AddRelease(p.version, p.ReleaseFile, buff)) {
if p.errHandled(p.ds.AddRelease(p.version, filepath.Base(p.ReleaseFile), buff)) {
return
}
p.setStage(stageReleased)
if p.errHandled(p.ds.AddLog(p.version, p.stage,
fmt.Sprintf("Project %s Version %s built, tested, and released successfully.\n", p.id(), p.version))) {
fmt.Sprintf("Project %s Version %s built, tested, and released successfully and took %s.\n", p.id(), p.version,
time.Now().Sub(p.start)))) {
return
}

@@ -121,7 +121,7 @@ func (ds *Store) LastRelease() (*Release, error) {
err := ds.bolt.View(func(tx *bolt.Tx) error {
c := tx.Bucket([]byte(bucketReleases)).Cursor()
_, v := c.Last()
_, v := c.First() // this is confusing
if v == nil {
return ErrNotFound
}

@@ -68,6 +68,7 @@ type Project struct {
status string
version string
hash string
start time.Time // the last start time of the latest cycle
sync.RWMutex
processing sync.Mutex

@@ -177,7 +177,7 @@
<td>
<a href="/project/{{.id}}/{{.lastLog.version}}">{{.lastLog.version}}</a>
</td>
<td title="{{.lastLog.log}}">{{#if .lastLog.log}}{{.lastLog.log.substring(0,100)}}{{/if}}</td>
<td title="{{.lastLog.log}}">{{#if .lastLog.log && .lastLog.length > 100}}{{.lastLog.log.substring(0,100)}}...{{else}}{{.lastLog.log}}{{/if}}</td>
<td>
<a href="/project/{{.id}}/{{.releaseVersion}}">{{.releaseVersion}}</a>
</td>
@@ -213,7 +213,7 @@
<a href="/project/{{project.id}}/{{.version}}">{{.version}}</a>
</td>
<td>{{.stage}}</td>
<td title="{{.log}}">{{#if .log}}{{.log.substring(0,100)}}{{/if}}</td>
<td title="{{.log}}">{{#if .log && .log.length > 100}}{{.log.substring(0,100)}}...{{else}}{{.log}}{{/if}}</td>
<td>
{{#if releases[project.id + .version]}}
<a href="/release/{{project.id}}/{{.version}}?file">{{releases[project.id + .version].fileName}}</a>

@@ -135,7 +135,11 @@ Ractive.DEBUG = false;
function getVersion(id, version) {
get("/log/" + id + "/" + version,
function(result) {
if (!result.data || !result.data.length || !result.data[0].version) {
r.set("version", version);
} else {
r.set("version", result.data[0].version);
}
r.set("stages", result.data);
},
function(result) {
@@ -171,6 +175,8 @@ Ractive.DEBUG = false;
//statuses
if (project.stage != "waiting") {
project.status = project.stage;
} else if (!project.lastLog || !project.lastLog.version) {
project.status = "waiting";
} else if (project.lastLog.version.trim() == project.releaseVersion.trim()) {
project.status = "Successfully Released";
} else {