Skip to content

Commit

Permalink
Merge pull request #6 from bitrise-steplib/builder_update
Browse files Browse the repository at this point in the history
builder update - step version updates
  • Loading branch information
godrei committed Jun 2, 2016
2 parents 4011f02 + 31b1c10 commit 05c9f8c
Show file tree
Hide file tree
Showing 26 changed files with 1,049 additions and 431 deletions.
178 changes: 168 additions & 10 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,195 @@ app:
# define these in your .bitrise.secrets.yml
- BITRISE_SCAN_RESULT_POST_URL: $BITRISE_SCAN_RESULT_POST_URL
- BITRISE_APP_API_TOKEN: $BITRISE_APP_API_TOKEN
- SCAN_DIR: "/Users/godrei/Develop/bitrise/sample-apps/sample-apps-ios-cocoapods"
- SCAN_DIR: "/Users/godrei/Develop/bitrise/sample-apps/sample-apps-android"
- SCAN_DIR: "/Users/godrei/Develop/bitrise/sample-apps/sample-apps-xamarin-uitest"
- SCAN_DIR: "/Users/godrei/Develop/bitrise/sample-apps/fastlane-example"

workflows:
# ----------------------------------------------------------------
# --- workflow to Step Test
test:
envs:
- CI: "true"
title: Bitrise Init Test
description: Bitrise Init Test
steps:
- script:
title: _tmp dir cleanup
title: "Scann test: ios-no-shared-schemes"
inputs:
- content: |-
#!/bin/bash
set -x
rm -rf ./_tmp
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-samples/ios-no-shared-schemes.git
git clone $SAMPLE_APP_REPOSITORY_URL ./_tmp/sample-repo
- change-workdir:
title: Switch working dir to ./_tmp
run_if: true
inputs:
- path: ./_tmp/sample-repo
- is_create_path: true
- path::./:
title: Step Test
inputs:
- scan_dir: ./
- output_dir: ../result
- scan_result_submit_url: $BITRISE_SCAN_RESULT_POST_URL
- scan_result_submit_api_token: $BITRISE_APP_API_TOKEN
- script:
title: "Scann test: sample-apps-ios-simple-objc"
inputs:
- content: |-
#!/bin/bash
set -x
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-io/sample-apps-ios-watchkit.git
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-samples/android-sdk22-no-gradlew.git
rm -rf ./_tmp
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-io/sample-apps-ios-simple-objc.git
git clone $SAMPLE_APP_REPOSITORY_URL ./_tmp/sample-repo
- change-workdir:
title: Switch working dir to ./_tmp
run_if: true
inputs:
- path: ./_tmp/sample-repo
- is_create_path: true
- path::./:
title: Step Test
inputs:
- scan_dir: ./
- output_dir: ../result
- scan_result_submit_url: $BITRISE_SCAN_RESULT_POST_URL
- scan_result_submit_api_token: $BITRISE_APP_API_TOKEN
- script:
title: "Scann test: sample-apps-android-sdk22"
inputs:
- content: |-
#!/bin/bash
set -x
rm -rf ./_tmp
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-samples/sample-apps-android-sdk22.git
git clone $SAMPLE_APP_REPOSITORY_URL ./_tmp/sample-repo
- change-workdir:
title: Switch working dir to ./_tmp
run_if: true
inputs:
- path: ./_tmp/sample-repo
- is_create_path: true
- path::./:
title: Step Test
inputs:
- scan_dir: ./
- output_dir: ../result
- scan_result_submit_url: $BITRISE_SCAN_RESULT_POST_URL
- scan_result_submit_api_token: $BITRISE_APP_API_TOKEN
- script:
title: "Scann test: xamarin-sample-app"
inputs:
- content: |-
#!/bin/bash
set -x
rm -rf ./_tmp
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-samples/xamarin-sample-app.git
git clone $SAMPLE_APP_REPOSITORY_URL ./_tmp/sample-repo
- change-workdir:
title: Switch working dir to ./_tmp
run_if: true
inputs:
- path: ./_tmp/sample-repo
- is_create_path: true
- path::./:
title: Step Test
inputs:
- scan_dir: ./
- output_dir: ../result
- scan_result_submit_url: $BITRISE_SCAN_RESULT_POST_URL
- scan_result_submit_api_token: $BITRISE_APP_API_TOKEN
- script:
title: "Scann test: sample-apps-ios-watchkit"
inputs:
- content: |-
#!/bin/bash
set -x
rm -rf ./_tmp
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-io/sample-apps-ios-watchkit.git
git clone $SAMPLE_APP_REPOSITORY_URL ./_tmp/sample-repo
- change-workdir:
title: Switch working dir to ./_tmp
run_if: true
inputs:
- path: ./_tmp/sample-repo
- is_create_path: true
- path::./:
title: Step Test
inputs:
- scan_dir: ./
- output_dir: ../result
- scan_result_submit_url: $BITRISE_SCAN_RESULT_POST_URL
- scan_result_submit_api_token: $BITRISE_APP_API_TOKEN
# - script:
# title: "Scann test: android-sdk22-no-gradlew"
# inputs:
# - content: |-
# #!/bin/bash
# set -x
#
# rm -rf ./_tmp
# SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-samples/android-sdk22-no-gradlew.git
# git clone $SAMPLE_APP_REPOSITORY_URL ./_tmp/sample-repo
# $SCANNER_BIN --ci config --dir ./_tmp/sample-repo --output-dir ./_tmp/output --format json
- script:
title: "Scann test: sample-apps-xamarin-ios"
inputs:
- content: |-
#!/bin/bash
set -x
rm -rf ./_tmp
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-io/sample-apps-xamarin-ios.git
git clone $SAMPLE_APP_REPOSITORY_URL ./_tmp/sample-repo
- change-workdir:
title: Switch working dir to ./_tmp
run_if: true
inputs:
- path: ./_tmp/sample-repo
- is_create_path: true
- path::./:
title: Step Test
inputs:
- scan_dir: ./
- output_dir: ../result
- scan_result_submit_url: $BITRISE_SCAN_RESULT_POST_URL
- scan_result_submit_api_token: $BITRISE_APP_API_TOKEN
- script:
title: "Scann test: android-non-executable-gradlew"
inputs:
- content: |-
#!/bin/bash
set -x
rm -rf ./_tmp
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-samples/android-non-executable-gradlew.git
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-io/sample-apps-xamarin-android.git
git clone $SAMPLE_APP_REPOSITORY_URL ./_tmp/sample-repo
- change-workdir:
title: Switch working dir to ./_tmp
run_if: true
inputs:
- path: ./_tmp/sample-repo
- is_create_path: true
- path::./:
title: Step Test
inputs:
- scan_dir: ./
- output_dir: ../result
- scan_result_submit_url: $BITRISE_SCAN_RESULT_POST_URL
- scan_result_submit_api_token: $BITRISE_APP_API_TOKEN
- script:
title: "Scann test: sample-apps-xamarin-android"
inputs:
- content: |-
#!/bin/bash
set -x
rm -rf ./_tmp
SAMPLE_APP_REPOSITORY_URL=https://github.com/bitrise-io/sample-apps-xamarin-android.git
git clone $SAMPLE_APP_REPOSITORY_URL ./_tmp/sample-repo
- change-workdir:
title: Switch working dir to ./_tmp
Expand Down
2 changes: 1 addition & 1 deletion deplock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"dep_locks": [
{
"url": "https://github.com/bitrise-core/bitrise-init.git",
"revision": "49162a7023d6c4af00defb7526d1f7fcf8dc0ac6"
"revision": "b77126bee0e9ff8a1a795eda8427bfc7bc534be1"
}
]
}
3 changes: 1 addition & 2 deletions go/src/github.com/bitrise-core/bitrise-init/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
_scan_result/
_defaults/
_tmp/
_bin/
.bitrise*


18 changes: 18 additions & 0 deletions go/src/github.com/bitrise-core/bitrise-init/CHANGELOG.md
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
4 changes: 2 additions & 2 deletions go/src/github.com/bitrise-core/bitrise-init/README.md
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
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)
}
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
Loading

0 comments on commit 05c9f8c

Please sign in to comment.