Skip to content

Enable doc upload for tags, disable for release branches #3153

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

Closed
wants to merge 16 commits into from

Conversation

svekars
Copy link
Contributor

@svekars svekars commented Apr 19, 2024

  • Disabled doc upload for branches like release/x.x
  • Enabled publishing for tags.

Tested locally:

export GITHUB_REF=refs/tags/v3.1.4-rc5
bash test-version.py
# test-version.py
if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+)\.* ]]; then
  TARGET_FOLDER="${BASH_REMATCH[1]}"
else
  TARGET_FOLDER="main"
fi
echo "Target folder: ${TARGET_FOLDER}"

Output:

Target folder: 3.1

One more:

export GITHUB_REF=refs/tags/v1.15.4
bash test-version.sh

Output:

Target folder: 1.15

- Disabled doc upload for branches like release/x.x
- Enabled publishing for tags.

Tested locally:
```
export GITHUB_REF=refs/tags/v3.1.4-rc5
```
bash test-version.py
```
# test-version.py
if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+)\.* ]]; then
  TARGET_FOLDER="${BASH_REMATCH[1]}"
else
  TARGET_FOLDER="main"
fi
echo "Target folder: ${TARGET_FOLDER}"
```
Output:
```
Target folder: 3.1
```
One more:
```
export GITHUB_REF=refs/tags/v1.15.4
bash test-version.sh
```
Output:
```
Target folder: 1.15
```
Copy link

pytorch-bot bot commented Apr 19, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3153

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 5ce8f01 with merge base 2c467dd (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 19, 2024
@svekars svekars requested review from clee2000 and dbort April 22, 2024 19:15
Copy link
Contributor

@dbort dbort left a comment

Choose a reason for hiding this comment

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

Thanks, that's much simpler.

Please import this into a phabricator diff to run internal testing so we can land it

@facebook-github-bot
Copy link
Contributor

@svekars has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@svekars has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@svekars has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@svekars merged this pull request in ee8c3a6.

@svekars
Copy link
Contributor Author

svekars commented Apr 23, 2024

@pytorchbot cherry-pick --onto release/0.2 -c docs

@pytorchbot
Copy link
Collaborator

Cherry picking #3153

The cherry pick PR is at #3243

Details for Dev Infra team Raised by workflow job

pytorchbot pushed a commit that referenced this pull request Apr 23, 2024
Summary:
- Disabled doc upload for branches like release/x.x
- Enabled publishing for tags.

Tested locally:
```
export GITHUB_REF=refs/tags/v3.1.4-rc5
bash test-version.py
```
```
# test-version.py
if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+)\.* ]]; then
  TARGET_FOLDER="${BASH_REMATCH[1]}"
else
  TARGET_FOLDER="main"
fi
echo "Target folder: ${TARGET_FOLDER}"
```
Output:
```
Target folder: 3.1
```
One more:
```
export GITHUB_REF=refs/tags/v1.15.4
bash test-version.sh
```
Output:
```
Target folder: 1.15
```

Pull Request resolved: #3153

Reviewed By: dbort

Differential Revision: D56445037

Pulled By: svekars

fbshipit-source-id: e7328523dfe308e8921c1e4f365d9a757d053191
(cherry picked from commit ee8c3a6)
guangy10 pushed a commit that referenced this pull request Apr 23, 2024
Summary:
- Disabled doc upload for branches like release/x.x
- Enabled publishing for tags.

Tested locally:
```
export GITHUB_REF=refs/tags/v3.1.4-rc5
bash test-version.py
```
```
# test-version.py
if [[ "${GITHUB_REF}" =~ ^refs/tags/v([0-9]+\.[0-9]+)\.* ]]; then
  TARGET_FOLDER="${BASH_REMATCH[1]}"
else
  TARGET_FOLDER="main"
fi
echo "Target folder: ${TARGET_FOLDER}"
```
Output:
```
Target folder: 3.1
```
One more:
```
export GITHUB_REF=refs/tags/v1.15.4
bash test-version.sh
```
Output:
```
Target folder: 1.15
```

Pull Request resolved: #3153

Reviewed By: dbort

Differential Revision: D56445037

Pulled By: svekars

fbshipit-source-id: e7328523dfe308e8921c1e4f365d9a757d053191
(cherry picked from commit ee8c3a6)

Co-authored-by: Svetlana Karslioglu <[email protected]>
This was referenced Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants