Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Conversation

@andresmgot
Copy link
Contributor

This diff enable automatic releases for new versions. Once a new version is detected a release is created in Github and the version is published in the NPM registry.

Example of a Github release: https://github.com/andresmgot/serverless-kubeless/releases/tag/v0.1.12

fi

origin=`git config --get remote.origin.url`
if [[ "$origin" != "https://github.com/$REPO_DOMAIN/$REPO_NAME" ]]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this check necessary?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is also TRAVIS_REPO_SLUG: The slug (in form: owner_name/repo_name) of the repository currently being built.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need it to avoid triggering releases from my fork.
Did't find the TRAVIS_REPO_SLUG, good point

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, it shouldn't be running in your fork if you disable builds for it. Also the ACCESS_TOKEN should not be available in yours or anyone else's fork for this to actually release anything if it is enabled. This isn't a check you usually find in travis build files because it generally isn't needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use the builds in my fork to early discover errors. I am not sure of how secrets work I know that is not usable in any repository but the one configured but I don't know what is its value in my fork, that's why I didn't use it for the check. I guess it is not set in that case, I will check that.

@@ -1,6 +1,6 @@
{
"name": "serverless-kubeless",
"version": "0.1.11",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a way to update version automatically with ${TRAVIS_TAG} env

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that TRAVIS_TAG is available in the builds triggered by a new tag. These scripts are meant to generate that tag so the environment variable is not available yet.

# Parse relase notes like an list (e.g):
# - 12345abcd Merge pull request #1 Title
# - 12345efgh commit included 1
# - 12345hijk commit included 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment lines

#!/bin/bash
set -e

function get_version {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ you can consider to use ${TRAVIS_TAG}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(see other comment)

@andresmgot andresmgot merged commit 326db7e into serverless:master Sep 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants