Skip to content

Commit 38a60f7

Browse files
BirmacherAkosgodrei
authored andcommitted
New release flow (bitrise-steplib#70)
* 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
1 parent e33629f commit 38a60f7

7 files changed

+13
-334
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.bitrise*
22
_tmp
33
.bundle/
4-
.gows*

CHANGELOG.md

-190
This file was deleted.

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,8 @@ You can share your Step or step version with the [bitrise CLI](https://github.co
8989
1. Send the Pull Request, as described in the logs of `bitrise run share-this-step`
9090

9191
That's all ;)
92+
93+
## Trigger a new release
94+
95+
- __merge every code changes__ to the `master` branch
96+
- __push the new version tag__ to the `master` branch

bitrise.yml

+8-114
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
format_version: "2"
1+
format_version: 5
22
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
33

44
app:
55
envs:
6-
- RELEASE_VERSION: 1.3.12
7-
6+
- STEP_ID_IN_STEPLIB: deploy-to-bitrise-io
7+
88
# define these in your .bitrise.secrets.yml
99
- BITRISE_BUILD_URL: $BITRISE_BUILD_URL
1010
- BITRISE_BUILD_API_TOKEN: $BITRISE_BUILD_API_TOKEN
@@ -19,8 +19,12 @@ workflows:
1919
# --- workflow to Step Test
2020
ci:
2121
before_run:
22-
- go-tests
22+
- audit-this-step
2323
steps:
24+
- go-list:
25+
- golint:
26+
- errcheck:
27+
- go-test:
2428
- script:
2529
inputs:
2630
- content: |-
@@ -112,67 +116,6 @@ workflows:
112116
echo "-> BITRISE_PUBLIC_INSTALL_PAGE_URL: ${BITRISE_PUBLIC_INSTALL_PAGE_URL}"
113117
echo "-> BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP: ${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP}"
114118
115-
go-tests:
116-
before_run:
117-
- _install-test-tools
118-
steps:
119-
- script:
120-
title: Export go files to test
121-
inputs:
122-
- content: |-
123-
#!/bin/bash
124-
set -ex
125-
126-
no_vendor_paths="$(go list ./... | grep -v vendor)"
127-
envman add --key GOLIST_WITHOUT_VENDOR --value "$no_vendor_paths"
128-
- script:
129-
title: Err check
130-
inputs:
131-
- content: |-
132-
#!/bin/bash
133-
set -ex
134-
135-
errcheck -asserts=true -blank=true $GOLIST_WITHOUT_VENDOR
136-
- script:
137-
title: Go lint
138-
inputs:
139-
- content: |-
140-
#!/bin/bash
141-
set -ex
142-
143-
while read -r line; do
144-
echo "-> Linting: $line"
145-
golint_out="$(golint $line)"
146-
if [[ "${golint_out}" != "" ]] ; then
147-
echo "=> Golint issues found:"
148-
echo "${golint_out}"
149-
exit 1
150-
fi
151-
done <<< "$GOLIST_WITHOUT_VENDOR"
152-
- script:
153-
title: Go test
154-
inputs:
155-
- content: |-
156-
#!/bin/bash
157-
set -ex
158-
159-
go test ./...
160-
161-
_install-test-tools:
162-
steps:
163-
- script:
164-
title: Install required testing tools
165-
inputs:
166-
- content: |-
167-
#!/bin/bash
168-
set -ex
169-
170-
# Check for unhandled errors
171-
go get -u -v github.com/kisielk/errcheck
172-
173-
# Go lint
174-
go get -u -v github.com/golang/lint/golint
175-
176119
# ----------------------------------------------------------------
177120
# --- Utility workflows
178121
dep-update:
@@ -186,23 +129,9 @@ workflows:
186129
- content: |-
187130
#!/bin/bash
188131
set -ex
189-
go get -u -v github.com/golang/dep/cmd/dep
190132
dep ensure -v
191133
dep ensure -v -update
192134
193-
# ----------------------------------------------------------------
194-
# --- workflow to create Release version
195-
create-release:
196-
steps:
197-
- script:
198-
title:
199-
inputs:
200-
- content: |
201-
#!/bin/bash
202-
set -ex
203-
go get -u github.com/bitrise-tools/releaseman
204-
export CI=true
205-
releaseman create --version "$RELEASE_VERSION"
206135
207136
# ----------------------------------------------------------------
208137
# --- workflow to Share this step into a Step Library
@@ -214,38 +143,3 @@ workflows:
214143
#!/bin/bash
215144
set -ex
216145
stepman audit --step-yml ./step.yml
217-
218-
share-this-step:
219-
envs:
220-
# if you want to share this step into a StepLib
221-
- MY_STEPLIB_REPO_FORK_GIT_URL: $MY_STEPLIB_REPO_FORK_GIT_URL
222-
- STEP_ID_IN_STEPLIB: deploy-to-bitrise-io
223-
- STEP_GIT_VERION_TAG_TO_SHARE: $RELEASE_VERSION
224-
- STEP_GIT_CLONE_URL: https://github.com/bitrise-io/steps-deploy-to-bitrise-io.git
225-
description: |-
226-
If this is the first time you try to share a Step you should
227-
first call: $ bitrise share
228-
This will print you a guide, and information about how Step sharing
229-
works. Please read it at least once!
230-
As noted in the Step sharing guide you'll have to fork the
231-
StepLib you want to share this step into. Once you're done with forking
232-
the repository you should set your own fork's git clone URL
233-
in the `.bitrise.secrets.yml` file, or here in the `envs` section,
234-
as the value of the `MY_STEPLIB_REPO_FORK_GIT_URL` environment.
235-
You're now ready to share this Step, just make sure that
236-
the `STEP_ID_IN_STEPLIB` and `STEP_GIT_VERION_TAG_TO_SHARE`
237-
environments are set to the desired values!
238-
To share this Step into a StepLib you can just run: $ bitrise run share-this-step
239-
Once it finishes the only thing left is to actually create a Pull Request,
240-
the way described in the guide printed at the end of the process.
241-
before_run:
242-
- audit-this-step
243-
steps:
244-
- script:
245-
inputs:
246-
- content: |-
247-
#!/bin/bash
248-
set -ex
249-
bitrise share start -c ${MY_STEPLIB_REPO_FORK_GIT_URL}
250-
bitrise share create --stepid ${STEP_ID_IN_STEPLIB} --tag ${STEP_GIT_VERION_TAG_TO_SHARE} --git ${STEP_GIT_CLONE_URL}
251-
bitrise share finish

gows.yml

-1
This file was deleted.

release_config.yml

-13
This file was deleted.

step.sh

-15
This file was deleted.

0 commit comments

Comments
 (0)