-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
1 parent
8d3d92d
commit 594a33a
Showing
4 changed files
with
23 additions
and
31 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
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 |
---|---|---|
|
@@ -8,19 +8,7 @@ ssh-keyscan -t rsa -H git.launchpad.net > ~/.ssh/known_hosts | |
git config user.name "CI Bot" | ||
git config user.email "[email protected]" | ||
|
||
# Determine the channel to push snap to. | ||
if [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+ ]]; then | ||
CHANNEL=candidate | ||
RC_VERSION=$CIRCLE_TAG | ||
elif [[ $CIRCLE_TAG ]]; then | ||
CHANNEL=stable | ||
RC_VERSION=$CIRCLE_TAG | ||
else | ||
CHANNEL=edge | ||
RC_VERSION=0.59.0-develop | ||
fi | ||
|
||
echo "Preparing to trigger a snap release for $CHANNEL channel" | ||
echo "Preparing to trigger a snap release for $SNAP_CHANNEL channel" | ||
|
||
cd $PWD/.snapcraft | ||
|
||
|
@@ -34,7 +22,7 @@ chmod 0600 launchpadkey | |
echo "Tag: $CIRCLE_TAG \r\nBranch: $CIRCLE_BRANCH\r\nBuild: $CIRCLE_BUILD_NUM\r\nCommit: $CIRCLE_SHA1" > buildinfo | ||
|
||
# Clone launchpad repo for the channel down. | ||
GIT_SSH_COMMAND="ssh -i launchpadkey" git clone -b $CHANNEL git+ssh://[email protected]/rocket.chat launchpad | ||
GIT_SSH_COMMAND="ssh -i launchpadkey" git clone -b $SNAP_CHANNEL git+ssh://[email protected]/rocket.chat launchpad | ||
|
||
# Rarely will change, but just incase we copy it all | ||
cp -r resources buildinfo launchpad/ | ||
|
@@ -47,7 +35,7 @@ git add resources snapcraft.yaml buildinfo | |
git commit -m "CircleCI Build: $CIRCLE_BUILD_NUM CircleCI Commit: $CIRCLE_SHA1" | ||
|
||
# Push up up to the branch of choice. | ||
GIT_SSH_COMMAND="ssh -i ../launchpadkey" git push origin $CHANNEL | ||
GIT_SSH_COMMAND="ssh -i ../launchpadkey" git push origin $SNAP_CHANNEL | ||
|
||
# Clean up | ||
cd .. | ||
|
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