Skip to content

Commit

Permalink
New release flow (#70)
Browse files Browse the repository at this point in the history
* docs(update): updated the readme with the "how to trigger new release" section

* refactor(remove): removed the changelog & release_config because we will not need the with the new release flow

* refactor(remove): removed the step.sh because we are using the main.go now

* refactor(dependency): gows dependency manager removed becouse we are not using it.

* git(gitignore): gitignore updated

* refactor(config): removed the old release workflows
  • Loading branch information
BirmacherAkos authored and godrei committed Sep 11, 2018
1 parent e33629f commit 38a60f7
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 334 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.bitrise*
_tmp
.bundle/
.gows*
190 changes: 0 additions & 190 deletions CHANGELOG.md

This file was deleted.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,8 @@ You can share your Step or step version with the [bitrise CLI](https://github.co
1. Send the Pull Request, as described in the logs of `bitrise run share-this-step`

That's all ;)

## Trigger a new release

- __merge every code changes__ to the `master` branch
- __push the new version tag__ to the `master` branch
122 changes: 8 additions & 114 deletions bitrise.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
format_version: "2"
format_version: 5
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git

app:
envs:
- RELEASE_VERSION: 1.3.12
- STEP_ID_IN_STEPLIB: deploy-to-bitrise-io

# define these in your .bitrise.secrets.yml
- BITRISE_BUILD_URL: $BITRISE_BUILD_URL
- BITRISE_BUILD_API_TOKEN: $BITRISE_BUILD_API_TOKEN
Expand All @@ -19,8 +19,12 @@ workflows:
# --- workflow to Step Test
ci:
before_run:
- go-tests
- audit-this-step
steps:
- go-list:
- golint:
- errcheck:
- go-test:
- script:
inputs:
- content: |-
Expand Down Expand Up @@ -112,67 +116,6 @@ workflows:
echo "-> BITRISE_PUBLIC_INSTALL_PAGE_URL: ${BITRISE_PUBLIC_INSTALL_PAGE_URL}"
echo "-> BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP: ${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP}"
go-tests:
before_run:
- _install-test-tools
steps:
- script:
title: Export go files to test
inputs:
- content: |-
#!/bin/bash
set -ex
no_vendor_paths="$(go list ./... | grep -v vendor)"
envman add --key GOLIST_WITHOUT_VENDOR --value "$no_vendor_paths"
- script:
title: Err check
inputs:
- content: |-
#!/bin/bash
set -ex
errcheck -asserts=true -blank=true $GOLIST_WITHOUT_VENDOR
- script:
title: Go lint
inputs:
- content: |-
#!/bin/bash
set -ex
while read -r line; do
echo "-> Linting: $line"
golint_out="$(golint $line)"
if [[ "${golint_out}" != "" ]] ; then
echo "=> Golint issues found:"
echo "${golint_out}"
exit 1
fi
done <<< "$GOLIST_WITHOUT_VENDOR"
- script:
title: Go test
inputs:
- content: |-
#!/bin/bash
set -ex
go test ./...
_install-test-tools:
steps:
- script:
title: Install required testing tools
inputs:
- content: |-
#!/bin/bash
set -ex
# Check for unhandled errors
go get -u -v github.com/kisielk/errcheck
# Go lint
go get -u -v github.com/golang/lint/golint
# ----------------------------------------------------------------
# --- Utility workflows
dep-update:
Expand All @@ -186,23 +129,9 @@ workflows:
- content: |-
#!/bin/bash
set -ex
go get -u -v github.com/golang/dep/cmd/dep
dep ensure -v
dep ensure -v -update
# ----------------------------------------------------------------
# --- workflow to create Release version
create-release:
steps:
- script:
title:
inputs:
- content: |
#!/bin/bash
set -ex
go get -u github.com/bitrise-tools/releaseman
export CI=true
releaseman create --version "$RELEASE_VERSION"
# ----------------------------------------------------------------
# --- workflow to Share this step into a Step Library
Expand All @@ -214,38 +143,3 @@ workflows:
#!/bin/bash
set -ex
stepman audit --step-yml ./step.yml
share-this-step:
envs:
# if you want to share this step into a StepLib
- MY_STEPLIB_REPO_FORK_GIT_URL: $MY_STEPLIB_REPO_FORK_GIT_URL
- STEP_ID_IN_STEPLIB: deploy-to-bitrise-io
- STEP_GIT_VERION_TAG_TO_SHARE: $RELEASE_VERSION
- STEP_GIT_CLONE_URL: https://github.com/bitrise-io/steps-deploy-to-bitrise-io.git
description: |-
If this is the first time you try to share a Step you should
first call: $ bitrise share
This will print you a guide, and information about how Step sharing
works. Please read it at least once!
As noted in the Step sharing guide you'll have to fork the
StepLib you want to share this step into. Once you're done with forking
the repository you should set your own fork's git clone URL
in the `.bitrise.secrets.yml` file, or here in the `envs` section,
as the value of the `MY_STEPLIB_REPO_FORK_GIT_URL` environment.
You're now ready to share this Step, just make sure that
the `STEP_ID_IN_STEPLIB` and `STEP_GIT_VERION_TAG_TO_SHARE`
environments are set to the desired values!
To share this Step into a StepLib you can just run: $ bitrise run share-this-step
Once it finishes the only thing left is to actually create a Pull Request,
the way described in the guide printed at the end of the process.
before_run:
- audit-this-step
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
bitrise share start -c ${MY_STEPLIB_REPO_FORK_GIT_URL}
bitrise share create --stepid ${STEP_ID_IN_STEPLIB} --tag ${STEP_GIT_VERION_TAG_TO_SHARE} --git ${STEP_GIT_CLONE_URL}
bitrise share finish
1 change: 0 additions & 1 deletion gows.yml

This file was deleted.

13 changes: 0 additions & 13 deletions release_config.yml

This file was deleted.

15 changes: 0 additions & 15 deletions step.sh

This file was deleted.

0 comments on commit 38a60f7

Please sign in to comment.