76 Commits

Author SHA1 Message Date
Andrew Overton
e946f7e093 [Releasing] Migrate release process to new official GitHub CLI
PiperOrigin-RevId: 347876263
2020-12-16 12:40:13 -08:00
featherless
022893e6de
[scripts/release] Connect stable to develop's ancestry. (#9342)
Prior to this change, merging the release-candidate would create a new merge commit in `stable` that was never accessible from `develop`'s direct history.

![Untitled Diagram (3)](https://user-images.githubusercontent.com/45670/71490777-af06ff00-27fa-11ea-8737-e24d7b6e69d0.png)

After this change, the release `merge` command will merge `stable` back into `release-candidate` prior to merging `release-candidate` into `develop`. This ensures that there is a direct lineage from `develop` to the most recent `stable` release.

![Untitled Diagram (2)](https://user-images.githubusercontent.com/45670/71490627-b8439c00-27f9-11ea-9c16-7338bea54a10.png)

Part of https://github.com/material-components/material-components-ios/issues/9025
2019-12-26 16:26:59 -05:00
featherless
d097de9b73
Revert "[scripts/release] Always branch off of stable. (#9310)" (#9341)
This reverts commit ca81e6e42826956e1912665a8e8077ab0d9705be.

The reverted commit does not actually fix the ancestry problem for a given release and the change was adding an unnecessary merge operation as a result. Simply branching off of `develop` is sufficient to create history from `stable` to `develop`.

In a follow-up change, I will address the actual root problem of `develop` not having an ancestral relations to the `stable` release commits.
2019-12-26 15:51:42 -05:00
featherless
ca81e6e428
[scripts/release] Always branch off of stable. (#9310)
Prior to this change, our release process was merging `develop` directly into `stable` without first branching off of `stable`.

The result of this process was that `stable` shares no common ancestor with `develop`, making it difficult to calculate differences between a commit on `develop` and a commit on `stable`.

One example of where this becomes problematic is in generating internal CLs for our PRs and for `develop`. It is not possible to compute the delta between the most recent `stable` commit that was mirrored internally and a given `develop` commit, making it difficult for tooling to apply deltas to the internal codebase without simply blowing away the internal directory and checking out the desired `develop` commit.

To fix this problem, we need to create a common ancestor between `develop` and `stable`. To do so, when cutting a release we need to cut the `release-candidate` from `stable` rather than `develop`, and then immediately merge `develop` into the release-candidate. This creates a common ancestor between `develop` and `stable`.

Note that this change causes us to deviate from the pure git flow model we have historically been following, as shown in the before/after of the model below (note the new red lines connecting stable to develop).

| Before | After |
|:--|:--|
| ![git-model@2x](https://user-images.githubusercontent.com/45670/71178792-ebf05600-223c-11ea-9f16-df72bd13a067.png) | ![git-model@2x copy 2](https://user-images.githubusercontent.com/45670/71179290-dd566e80-223d-11ea-8eab-2487490985f6.png) |
2019-12-19 12:54:06 -05:00
Randall Li
172e8d7acd
Release cut adjustment to generated change log (#9221)
Removed `## Changes` heading from the auto generated changes in release cut script because heading is a duplicate of the one above it.
2019-12-13 11:16:47 -05:00
Andrew Overton
7f7686dac6
Specify origin when checking out stable's .gitattributes (#8586)
The problem is that when you have a fresh clone (and you're not doing a hotfix) the "branch" variable in `scripts/release` points to `origin/develop`. There is no notion of a local stable branch. So commands like the one this PR changes need to specify a remote.

Closes #8585.
2019-10-15 15:19:15 +02:00
Yarden Eitan
2edbc6c330
Add git steps around .gitattributes file to keep it correct throughout the branches. (#8563)
To keep .gitattributes correct in both develop and stable branches, 2 additions were added, one to the cut and one to the merge steps.

In cut we checkout the .gitattributes from stable before opening the PR to merge from release-candidate to stable, as release-candidate was created from Develop, and therefore without checking out the .gitattributes version from stable, when merged it would take the develop version.

In merge, we do a no-commit merge and then reset the .gitattributes so that develop branch won't take the release-candidate/stable version.

Closes #8392
2019-10-10 15:21:34 -04:00
Yarden Eitan
e41c2e2ce8 update 2019-10-10 11:11:22 -04:00
Bryan Oltman
74cf005755
Correct gh authentication instruction in release script (#8473)
* Correct gh authentication instruction in release script

* Make command work if workstation username is not github username
2019-09-19 16:57:28 -04:00
featherless
0edd1705ab
[scripts/release] Ignore goldens when generating component notes (#6861)
Prior to this change, `./scripts/release notes` would consider commits that affected our snapshot goldens (found in `snapshot_test_goldens` as multi-component changes.

After this change, snapshot tests that change our goldens are properly bucketed in the relevant component.

## Before

```
## Changes

### ActionSheet

* [Fixes broken action sheet tests. (#6743)](fbcf524161) (Robert Moore)

### BottomNavigation

* [Clean up internal constants (#6834)](585a5f4d30) (Robert Moore)
* [Examples clean-up. (#6718)](10ed6188a5) (Robert Moore)
* [Prevents the client from setting the navigation items directly when using the bottom navigation bar controller. (#6773)](d049bc882a) (Eric Lee)

### Buttons

* [Allow setting `accessibilityTraits`. (#6766)](66c46649db) (Robert Moore)

### Collections

* [Clean up interface by removing NS_REQUIRES_SUPER (#6788)](921ad6e4db) (dmaclach)

### Ripple

* [Added a fix for the ripple sometimes blinking when ending animation (#6792)](6f51d265ad) (Yarden Eitan)
* [update docs (#6772)](c2e912df8f) (Yarden Eitan)

### Snackbar

* [Make initialization threadsafe. (#6768)](530c7b9b61) (Robert Moore)

### Tabs

* [Fix badge text truncation bug in MDCItemBarCell (#6786)](188f05a75e) (Andrew Overton)

## Multi-component changes

* [Add basic Snapshot tests (#6826)](2e5df058e3) (Robert Moore)
* [Add basic Snapshot tests. (#6801)](dd363f1118) (Robert Moore)
* [Add basic Snapshot tests. (#6821)](b1cab54a4f) (Robert Moore)
* [Add basic Snapshot tests. (#6823)](1d058b155b) (Robert Moore)
* [Add basic Snapshot tests. (#6824)](951cc57ba0) (Robert Moore)
* [Add basic Snapshot tests. (#6825)](018e72e3cf) (Robert Moore)
* [Add basic Snapshot tests. (#6828)](32904609b0) (Robert Moore)
* [Add basic snapshot tests. (#6822)](9e8fdc2d7f) (Robert Moore)
* [Dynamic Type 2.0 (#6733)](648f2499e8) (ianegordon)
* [Enable -Wunguarded-availability. (#6776)](f17b01c584) (featherless)
* [Revert "[Typography] Dynamic Type 2.0 (#6733)" (#6848)](7f52f35f07) (ianegordon)
* [{Tests} Fix font comparison in Objective-C. (#6789)](3447c7b719) (Robert Moore)
```

## After

```
## Changes

### ActionSheet

* [Fixes broken action sheet tests. (#6743)](fbcf524161) (Robert Moore)

### ActivityIndicator

* [Add basic Snapshot tests (#6826)](2e5df058e3) (Robert Moore)

### BottomNavigation

* [Clean up internal constants (#6834)](585a5f4d30) (Robert Moore)
* [Examples clean-up. (#6718)](10ed6188a5) (Robert Moore)
* [Prevents the client from setting the navigation items directly when using the bottom navigation bar controller. (#6773)](d049bc882a) (Eric Lee)

### Buttons

* [Allow setting `accessibilityTraits`. (#6766)](66c46649db) (Robert Moore)

### Collections

* [Clean up interface by removing NS_REQUIRES_SUPER (#6788)](921ad6e4db) (dmaclach)

### List

* [Add basic snapshot tests. (#6822)](9e8fdc2d7f) (Robert Moore)

### NavigationBar

* [Add basic Snapshot tests. (#6821)](b1cab54a4f) (Robert Moore)

### PageControl

* [Add basic Snapshot tests. (#6823)](1d058b155b) (Robert Moore)

### ProgressView

* [Add basic Snapshot tests. (#6825)](018e72e3cf) (Robert Moore)

### Ripple

* [Added a fix for the ripple sometimes blinking when ending animation (#6792)](6f51d265ad) (Yarden Eitan)
* [update docs (#6772)](c2e912df8f) (Yarden Eitan)

### Snackbar

* [Add basic Snapshot tests. (#6824)](951cc57ba0) (Robert Moore)
* [Make initialization threadsafe. (#6768)](530c7b9b61) (Robert Moore)

### Tabs

* [Add basic Snapshot tests. (#6801)](dd363f1118) (Robert Moore)
* [Fix badge text truncation bug in MDCItemBarCell (#6786)](188f05a75e) (Andrew Overton)

### Typography

* [Add basic Snapshot tests. (#6828)](32904609b0) (Robert Moore)

## Multi-component changes

* [Dynamic Type 2.0 (#6733)](648f2499e8) (ianegordon)
* [Enable -Wunguarded-availability. (#6776)](f17b01c584) (featherless)
* [Revert "[Typography] Dynamic Type 2.0 (#6733)" (#6848)](7f52f35f07) (ianegordon)
* [{Tests} Fix font comparison in Objective-C. (#6789)](3447c7b719) (Robert Moore)
```
2019-03-13 09:55:46 -04:00
Robert Moore
0d8911c99a
{Scripts} Abort merging release if develop is ahead/behind (#6062)
If the local `develop` branch is either ahead or behind of upstream, abort the
merge and make the user bring them up to date.
2018-12-26 09:06:01 -05:00
Robert Moore
82c9e9813f
[Scripts] Exit on error in release script (#6044)
The release script was continuing after errors failed to generate the
correct local clone of the repository for the API Diff step. This is
because the main release script suppresses non-zero return codes by
default. Instead, we should explicitly exit of any command returns an
unhandled non-zero value.
2018-12-20 08:42:41 -05:00
featherless
d6b743a043 {scripts/release} Disable git lfs cloning when generating API diff. (#6043)
The `scripts/release apidiff` command needs to create two local temporary clones of the repo in order to generate the API diff. Unfortunately, git lfs fails to clone local copies of a git repo, particularly when not using a `file://` prefix.

The fix is to disable git LFS cloning prior to the API diff temporary clone commands.

```bash
hint: The remote resolves to a file:// URL, which can only work with a
hint: standalone transfer agent.  See section "Using a Custom Transfer Type
hint: without the API server" in custom-transfers.md for details.

hint: The remote resolves to a file:// URL, which can only work with a
hint: standalone transfer agent.  See section "Using a Custom Transfer Type
hint: without the API server" in custom-transfers.md for details.

hint: The remote resolves to a file:// URL, which can only work with a
hint: standalone transfer agent.  See section "Using a Custom Transfer Type
hint: without the API server" in custom-transfers.md for details.

hint: The remote resolves to a file:// URL, which can only work with a
hint: standalone transfer agent.  See section "Using a Custom Transfer Type
hint: without the API server" in custom-transfers.md for details.
Downloading snapshot_test_goldens/goldens_64/MDCCardSnapshotTests/testDefaultCard_11_2@2x.png (1.9 KB)

hint: The remote resolves to a file:// URL, which can only work with a
hint: standalone transfer agent.  See section "Using a Custom Transfer Type
hint: without the API server" in custom-transfers.md for details.
Error downloading object: snapshot_test_goldens/goldens_64/MDCCardSnapshotTests/testDefaultCard_11_2@2x.png (96d48d5): Smudge error: Error downloading snapshot_test_goldens/goldens_64/MDCCardSnapshotTests/testDefaultCard_11_2@2x.png (96d48d51f415dc94427e49a361cf68cdadc86d0e00a6706894a7f82b5d13b086): batch request: missing protocol: "file:///Users/featherless/workbench/material-components-ios/.git/info/lfs"

Errors logged to /private/tmp/mdcios/mdc-ios/.git/lfs/logs/20181218T112727.676554.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: snapshot_test_goldens/goldens_64/MDCCardSnapshotTests/testDefaultCard_11_2@2x.png: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
```
2018-12-18 12:56:12 -05:00
featherless
73bdc03c2b
[automated] Rename MaterialComponentsAlpha to MaterialComponentsBeta. (#6018)
This is an automated change generated by replacing all instances of MaterialComponentsAlpha with MaterialComponentsBeta. This is not a breaking change because changes to Alpha/Beta components (including renaming them) are not considered breaking.

The MaterialComponentsAlpha podspec was mistakenly named Alpha, when what we meant was more close to Beta. The distinction is that Alpha components are not expected to be used by clients, while Beta components are.
2018-12-14 10:47:31 -05:00
featherless
1fa662346f
[scripts/release] Ignore more project-wide files when generating release notes. (#5852)
### Context

When determining whether a change affects multiple components we want to ignore changes to CocoaPods files that live outside of the components directories.

### The problem + fix

Prior to this change, if a commit modified MaterialComponentsAlpha.podspec or catalog/Podfile it was being picked up as a multi-component change in the release notes.

After this change, commits affecting those files will not be treated as multi-component changes unless they also touch other files in the repo.

### Opportunities for further improvement

It's likely fair to say that any modification to files outside of the `components/` directory can be ignored. I'm not sure what the best way to filter these types of changes is, but that would be a welcome follow-up simplification of this change that would require less on-going maintenance.
2018-11-28 13:08:12 -05:00
featherless
5fa9120510
[scripts/release] Improve the notes command output. (#5796)
The script now outputs four groups of changelogs:

1. Breaking changes for specific components.
2. Breaking changes across multiple components.
3. Changes for specific components.
4. Changes acrosss multiple components.
2018-11-20 09:16:00 -05:00
featherless
45bbf03603
[scripts/release] Fix component extension output in apidiff command. (#5210)
Prior to this change, `Component+Extension` additions would be incorrectly listed as a "New component" in the API diff.

After this change, `Componet+Extension` additions will be listed as "New extension" in the API diff.
2018-09-24 17:37:39 +03:00
Michelle Dudley
741d375605 [Codelabs] Add documentation for build_codelabs script (#4952)
* Fix typos

* Add build_codelabs documentation

* Add build_codelabs to release
2018-09-11 07:49:43 -07:00
featherless
6915a77f79 [scripts/release] Don't include automated changes in the release notes. (#4999)
Any commit with `[automated]` in its title will be excluded from the release notes.

Closes https://github.com/material-components/material-components-ios/issues/5002
2018-09-05 10:11:12 -04:00
featherless
fcf74f00c5 [scripts/release] Sort the notes output by component. (#5001)
Closes https://github.com/material-components/material-components-ios/issues/5000
2018-09-05 10:10:50 -04:00
featherless
158c9789ce [scripts/release] Remove the #### Changes header from notes output. (#5004)
Closes https://github.com/material-components/material-components-ios/issues/5003
2018-09-05 10:10:35 -04:00
featherless
bac4dce1c7
[scripts/release] Add a dragon to publishing the podspec. (#4971) 2018-08-30 15:59:13 -04:00
featherless
a826d72398
[scripts/release] Allow umbrellas and files to generate info from a given sha. (#4961)
The umbrellas command is fed in to the apidiff tool as a filter for which components to look at.

Prior to this change, the umbrellas command was ignoring the apidiff base sha and always generating results from origin/stable.

After this change, the umbrellas and files commands will both accept an optional base sha from which to generate results.

Tested by running:

```bash
./scripts/release umbrellas HEAD
# Should output nothing
```
2018-08-30 13:57:05 -04:00
featherless
a32cb6d72b
[scripts/release] Remove email step from the release tool. (#4941)
This is no longer part of our release process.
2018-08-29 11:29:38 -04:00
featherless
42d0c8db3d
[scripts/release] Add explanations for each section of the release notes. (#4822)
The release engineer is expected to fill these sections in by gathering the information from the commits. If information is not available in a given commit, then the release engineer is expected to reach out to the commit author and ask them to provide the additional information (and encouraging them to do so in their commits in the future).
2018-08-29 09:26:15 -04:00
featherless
c5fd516b7d
[scripts/release] apidiff now includes any folder with an umbrella header. (#4732)
This change ensures that our release notes include API diffs for sub-components such as our themers.

Closes https://github.com/material-components/material-components-ios/issues/3983

Example output:

### AppBar+ColorThemer

#### MDCAppBarColorThemer

*new* class method: `+applySurfaceVariantWithColorScheme:toAppBarViewController:` in `MDCAppBarColorThemer`

*new* class method: `+applyColorScheme:toAppBarViewController:` in `MDCAppBarColorThemer`

### AppBar

#### MDCAppBarContainerViewController

*new* property: `appBarViewController` in `MDCAppBarContainerViewController`

#### MDCAppBarNavigationControllerDelegate

*new* method: `-appBarNavigationController:willAddAppBarViewController:asChildOfViewController:` in `MDCAppBarNavigationControllerDelegate`

#### MDCAppBarViewController

*new* property: `navigationBar` in `MDCAppBarViewController`

*new* property: `headerStackView` in `MDCAppBarViewController`

*new* class: `MDCAppBarViewController`
2018-08-07 15:11:55 -04:00
featherless
dcc7561c28 [scripts/release] Add support for generating API diffs to an arbitrary sha. (#4164)
E.g. to generate an API diff from v54.0.0 to HEAD:

    ./scripts/release apidiff v54.0.0
2018-05-15 13:34:31 -04:00
featherless
6ef33306a7
Add a stories command to the release tool. (#3296)
Generates a list of pivotal stories included in the release.
2018-04-09 13:42:18 -04:00
Randall Li
14c9041c12 [release script] Minor white space nit change (#3199)
the heading
## Component changes
had to many new lines after and to few new lines before.
2018-03-30 14:14:29 -04:00
Randall Li
c116344fd8
Release script: checking out stable before pushing to cocopods. (#3099)
Keeping the error log when the push fails.
2018-03-16 14:55:39 -04:00
Adrian Secord
1969731cfe Fix version number updating. Fixes #2754. 2018-01-08 07:39:43 -05:00
Yarden Eitan
34ced9ee9a update our release script to support CocoaPods publishing (#2802)
* update release script to have a podspec push

* remove linting

* checking pod permission before, removing --allow-warnings
2018-01-05 16:52:42 -05:00
featherless
88a93244ab
Reduce error output from the bump command. (#2754)
The following changes were made:

- The global grep is now a non-regular expression search. This will avoid treating the version '.' as a wildcard.
- We ignore any of the bazel output directories.
- We pipe stderr to null so that invalid directories don't appear in the output.
2017-12-22 11:02:11 -05:00
Randall Li
fe88c3dfb0 [Release] Make release test not check for release-candidate (#2758)
Release instructions ask us to run it after we have merged.

https://github.com/material-components/material-components-ios/blob/develop/contributing/releasing.md#merge-the-release-candidate-branch

We also may want to just test without having created a release candidate.
2017-12-22 10:30:16 -05:00
Jeff Verkoeyen
a0ba8ed55a Fix minor typos in the release publish command. 2017-12-12 10:54:13 -05:00
Jeff Verkoeyen
1663ee2edc Update the Material Motion API diff tool checkout. 2017-12-11 12:50:48 -05:00
Jeff Verkoeyen
d45978aff1 Fix one more minor typo in the release scripting. 2017-12-11 12:48:41 -05:00
Jeff Verkoeyen
f86fa7b2b6 Fix bug where scripts/release cut wouldn't extract the API diff changes file properly.
It was extracting a string with a leading space - this is no longer the case.
2017-12-11 12:45:34 -05:00
featherless
98338f58cc
Migrate Material Motion's release toolchain to MDC (#2627) 2017-12-11 10:17:48 -05:00
Adrian Secord
6da7d0af51
[LibraryInfo] Fix version numbers for statically-compiled components. (#2544)
* Switched to hard-coded version string.

* Updating to current version and clarifying comments.

* Updated bump script to update LibraryInfo source version.

* Added actual replacement to bump script.

* Documented constants, changed version file name to a path.

* Fixed single-value tuple issue.

* Added note about string copy.
2017-11-30 14:25:27 -05:00
Adrian Secord
f5d3e30844
Move source of truth for version numbers outside of Cocoapods (#2442)
* Added VERSION, scripts/print_version, and updated docs.

* Updating script.

* Stop invoking `pod install` after the first time.

* Remove unneeded `pod install` steps.

* Added ref to print_version.

* Updated instructions in contributing/releasing.md.
2017-11-16 07:52:36 -05:00
featherless
c4160415f0 Add authors release script. (#2101)
Dumps the list of authors involved in a given release.
2017-10-05 14:57:15 -04:00
featherless
286adf335c Use not instead of ! in manage_pods.py. (#2082) 2017-10-03 09:32:33 -04:00
featherless
d7a7e9a524 Default CocoaPods install to update the pods repo. (#2081)
CocoaPods updated their default install behavior some time ago to not update the pods repo, but our pods management script still appeared to be assuming that it did update the repo. This change inverts our pod install logic so that it updates the spec repo by default.

This resolves some Travis CI failures we've seen when downstream pod releases get published but not picked up by the Travis CI instance's pre-imaged pods repo.
2017-10-03 09:01:36 -04:00
Adrian Secord
d2c05179f6 Renamed master to stable in docs and scripts.
Closes #161.
2016-12-15 08:24:14 -05:00
Adrian Secord
11a973dea7 Removed unused scripts/release/next. 2016-12-15 08:13:39 -05:00
Adrian Secord
f3de3e061b Removed site sources and references. (#1062) 2016-12-14 11:54:38 -05:00
Adrian Secord
0ae7c903ea Merge branch 'release-candidate' 2016-12-08 15:16:06 -05:00
Adrian Secord
f526af0a2c Fixed bump usage of manage_pods. 2016-12-08 09:04:17 -05:00
Adrian Secord
be375e60e9 Fixed scripts/release/diff. 2016-12-08 08:51:55 -05:00