-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from bitrise-steplib/builder_update
builder update - step version updates
- Loading branch information
Showing
26 changed files
with
1,049 additions
and
431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
_scan_result/ | ||
_defaults/ | ||
_tmp/ | ||
_bin/ | ||
.bitrise* | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Changelog (Current version: 0.9.1) | ||
|
||
----------------- | ||
|
||
### 0.9.1 (2016 Jun 02) | ||
|
||
* [0aff8d3] release workflow fix | ||
* [48ae75c] Merge pull request #10 from bitrise-core/scanner_packages | ||
* [1cb400b] missing errcheck fix | ||
* [66a1ae8] ci workflow update, release workflows | ||
* [eb604ed] version command, tool versioning | ||
* [3fd1723] code style | ||
* [27859d2] steps package, refactors | ||
* [67dfb3b] scanners moved to separated packages | ||
|
||
----------------- | ||
|
||
Updated: 2016 Jun 02 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Bitrise CLI Plugin - Init | ||
# Bitrise Init Tool | ||
|
||
### Initialize bitrise config, step template or plugin template | ||
Initialize bitrise config, step template or plugin template |
42 changes: 42 additions & 0 deletions
42
go/src/github.com/bitrise-core/bitrise-init/_scripts/get_version.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package main | ||
|
||
import ( | ||
"flag" | ||
"fmt" | ||
"io/ioutil" | ||
"log" | ||
"regexp" | ||
) | ||
|
||
func main() { | ||
// Inputs | ||
var ( | ||
versionFilePathParam = flag.String("file", "", `Version file path`) | ||
) | ||
|
||
flag.Parse() | ||
|
||
if versionFilePathParam == nil || *versionFilePathParam == "" { | ||
log.Fatalf(" [!] No version file parameter specified") | ||
} | ||
versionFilePath := *versionFilePathParam | ||
|
||
// Main | ||
versionFileBytes, err := ioutil.ReadFile(versionFilePath) | ||
if err != nil { | ||
log.Fatalf("Failed to read version file: %s", err) | ||
} | ||
versionFileContent := string(versionFileBytes) | ||
|
||
re := regexp.MustCompile(`const VERSION = "(?P<version>[0-9]+\.[0-9-]+\.[0-9-]+)"`) | ||
results := re.FindAllStringSubmatch(versionFileContent, -1) | ||
versionStr := "" | ||
for _, v := range results { | ||
versionStr = v[1] | ||
} | ||
if versionStr == "" { | ||
log.Fatalf("Failed to determine version") | ||
} | ||
|
||
fmt.Println(versionStr) | ||
} |
20 changes: 20 additions & 0 deletions
20
go/src/github.com/bitrise-core/bitrise-init/_scripts/set_version.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
version_file_path="$1" | ||
if [ ! -f "$version_file_path" ] ; then | ||
echo " [!] version_file_path not provided, or file doesn't exist at path: $version_file_path" | ||
exit 1 | ||
fi | ||
versionNumber=$next_version | ||
if [[ "$versionNumber" == "" ]] ; then | ||
echo " [!] versionNumber not provided" | ||
exit 1 | ||
fi | ||
|
||
cat >"${version_file_path}" <<EOL | ||
package version | ||
// VERSION ... | ||
const VERSION = "${versionNumber}" | ||
EOL |
Oops, something went wrong.