Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add built branch #1167

Closed
mjangda opened this issue May 23, 2018 · 4 comments
Closed

Add built branch #1167

mjangda opened this issue May 23, 2018 · 4 comments
Milestone

Comments

@mjangda
Copy link
Contributor

mjangda commented May 23, 2018

Many sites, including those hosted on VIP, prefer to submodule plugins directly from GItHub. Because the AMP plugin requires an extra build step before use, this is no longer possible.

It would be nice if we can set up an autogenerated built branch (using Travis or another CI service) that runs the necessary build steps and pushes a runnable version of the plugin.

Jetpack is one example plugin that provides this: https://github.com/Automattic/jetpack/tree/branch-6.1-built

@westonruter westonruter added this to the v1.0 milestone May 23, 2018
@westonruter
Copy link
Member

Good idea. What do you think about using a tag for this instead of a branch? I have a concern about using a branch with a new build commit made for every source commit on a corresponding branch: it can cause the repo size to balloon bigly, especially when JS is built. But if there were build tags created for each release branch (e.g. develop-built, 0.7-built), and each release tag (e.g. 0.7.0-built, 1.0-beta1-built), with each new build for the tag/branch causing a the built tag to be rewritten.

@mjangda
Copy link
Contributor Author

mjangda commented May 25, 2018

What do you think about using a tag for this instead of a branch?

Yep, a tag seems fine.

@westonruter
Copy link
Member

I've created the first built tag for 0.7.1: https://github.com/Automattic/amp-wp/releases/tag/0.7.1-built

I linked to it from the 0.7.1 release.

Here are the commands I used to create the release:

tag=0.7.1
git checkout $tag
npm run build
mkdir built
git clone . built/
cd built
git checkout $tag
git rm -r $(git ls-files)
rsync -avz ../build/ ./
git add -A .
git commit -m "Build $tag" --no-verify
git tag $tag-built
git push origin $tag-built
cd ..
git push origin $tag-built
rm -rf built

@westonruter
Copy link
Member

Also created built tag for 1.0-alpha1: https://github.com/Automattic/amp-wp/releases/tag/1.0-alpha1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants