Skip to content

Commit

Permalink
sentry fork
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile-sentry committed Oct 31, 2023
1 parent a9e6f67 commit 021fb90
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
minVersion: 0.34.0
targets:
- name: pypi
- name: github
- name: sentry-pypi
internalPypiRepo: getsentry/pypi
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build

on:
pull_request:
push:
branches: [main, release/**, test-me-*]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: |
set -x
pip install build
python -m build
# TODO: we don't yet need an ext fork
# cd ext
# python -m build --outdir ../dist
- uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: dist/*
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
merge_target:
description: Target branch to merge into. Uses the default branch as a fallback (optional)
required: true

jobs:
release:
runs-on: ubuntu-latest
name: "Release a new version"
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0
- name: Prepare release
uses: getsentry/action-prepare-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
with:
version: ${{ github.event.inputs.version }}
merge_target: ${{ github.event.inputs.merge_target }}
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
sentry-forked-django-stubs
==========================

### new release

make a new branch for the fork of an upstream tag:

```bash
git remote add upstream [email protected]:typeddjango/django-stubs
git fetch upstream --tags
git push origin --tags
git checkout 1.2.3 -b sentry-1.2.3
```

- cherry-pick the craft / release commit(s) into your branch from `master`
- cherry-pick relevant commit(s) from previous releases

releases are done through craft in the release.yml workflow -- make sure to
target your particular branch with a `.#` release postfix (like `1.2.3.0`)

___

<img src="https://raw.githubusercontent.com/typeddjango/django-stubs/master/logo.svg" alt="django-stubs">

[![Build status](https://github.com/typeddjango/django-stubs/workflows/test/badge.svg?branch=master&event=push)](https://github.com/typeddjango/django-stubs/actions?query=workflow%3Atest)
Expand Down
4 changes: 4 additions & 0 deletions scripts/bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euxo pipefail

sed -i "s/^ version="'"'".*"'"'",$/ version="'"'"$2"'"'",/" setup.py
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def find_stub_files(name: str) -> List[str]:
}

setup(
name="django-stubs",
name="sentry-forked-django-stubs",
version="4.2.6",
description="Mypy stubs for Django",
long_description=readme,
Expand Down

0 comments on commit 021fb90

Please sign in to comment.