forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -e -x -u | ||
|
||
expected_version=$CIRCLE_TAG | ||
current_version=$(python ./setup.py --version) | ||
echo "current_version is ${current_version}" | ||
echo "expected_version is ${expected_version}" | ||
|
||
if [[ "${current_version}" != "${expected_version}" ]]; then | ||
echo "Packaging code ${current_version} does not equal to tagged version, ${expected_version}" | ||
exit 1 | ||
else | ||
exit 0 | ||
fi |
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,43 @@ | ||
#!/bin/bash | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -e -x | ||
|
||
# Usage: $ ./prepare_for_release.py <type> | ||
# type - [major | minor | patch]. Default is patch. | ||
|
||
branch=$(git rev-parse --abbrev-ref HEAD) | ||
if [[ "${branch}" != "master" ]]; then | ||
echo "You may only tag a commit on the 'master' branch" | ||
exit 1; | ||
fi | ||
|
||
type=${1} | ||
if [ -z "${type}" ] | ||
then | ||
echo "defaulting to 'patch'" | ||
type="patch" | ||
else | ||
echo "update type is: ${type}" | ||
fi | ||
|
||
version=$(python ./setup.py --version) | ||
echo "Upgrading version from the current version of ${version}" | ||
|
||
|
||
# The {new_version} is not a bash variable - it's a bumpversion notation for the new version. | ||
# Please see bumpversion --help for more information. | ||
bumpversion --current-version ${version} --commit --tag --tag-name {new_version} ${type} ./setup.py | ||
git push --tags origin master | ||
echo "Done pushing to master" |
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