Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-python
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-python
Commits
18945ff1
Unverified
Commit
18945ff1
authored
Jul 06, 2018
by
Ian Stapleton Cordasco
Committed by
GitHub
Jul 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #724 from heroku/publish-automation
Steal the java buildpack's release script
parents
83d5d6ca
2e630ab5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
publish.sh
etc/publish.sh
+38
-0
No files found.
etc/publish.sh
0 → 100644
View file @
18945ff1
#!/bin/bash
set
-e
BP_NAME
=
${
1
:-
"heroku/python"
}
curVersion
=
$(
heroku buildpacks:versions
"
$BP_NAME
"
|
awk
'FNR == 3 { print $1 }'
)
newVersion
=
"v
$((
curVersion
+
1
))
"
read
-p
"Deploy as version:
$newVersion
[y/n]? "
choice
case
"
$choice
"
in
y|Y
)
echo
""
;;
n|N
)
exit
0
;;
*
)
exit
1
;;
esac
originMaster
=
$(
git rev-parse origin/master
)
echo
"Tagging commit
$originMaster
with
$newVersion
... "
git tag
"
$newVersion
"
"
${
originMaster
:?
}
"
git push origin refs/tags/
$newVersion
heroku buildpacks:publish
"
$BP_NAME
"
"
$newVersion
"
if
[
$(
git tag |
grep
-q
previous-version
)
]
;
then
echo
"Updating previous-version tag"
git tag
-d
previous-version
git push origin :previous-version
git tag previous-version latest-version
fi
if
[
$(
git tag |
grep
-q
latest-version
)
]
;
then
echo
"Updating latest-version tag"
git tag
-d
latest-version
git push origin :latest-version
git tag latest-version
"
${
originMaster
:?
}
"
git push
--tags
fi
echo
"Done."
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment