Skip to content

Commit

Permalink
change dev release address
Browse files Browse the repository at this point in the history
  • Loading branch information
wang0618 committed Nov 21, 2022
1 parent 3779951 commit 291a7d6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 27 deletions.
13 changes: 1 addition & 12 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,13 @@ kind: pipeline
type: exec
name: default

clone:
disable: true

trigger:
branch:
- dev
- dev-release
event:
- push

steps:
- name: clone
commands:
- sleep 300 # wait aliyun repo to sync
- git init
- git remote add aliyun "https://code.aliyun.com/wang0618/pywebio.git"
- git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 aliyun $DRONE_BRANCH
- git checkout --progress --force -B $DRONE_BRANCH aliyun/$DRONE_BRANCH
- git log -1
- name: deploy demos
commands:
- | # https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#pipe-dockerfile-through-stdin
Expand Down
29 changes: 17 additions & 12 deletions .github/workflows/sync_repo.yml → .github/workflows/build_dev.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Sync with mirror repo
name: build dev version
on:
push:
branches:
- dev
repository_dispatch:

jobs:
sync:
build_dev:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -32,20 +32,25 @@ jobs:
cd docs && CODE_EXPORT_PATH=../demos/doc_demos make clean html
- name: Set dev version
run: python3 tools/build_dev_version.py
- name: Push
- name: Release dev version
run: |
git config --global user.email "$(git log -n 1 --pretty=format:%ae)"
git config --global user.name "${{ github.actor }}"
# ref: https://stackoverflow.com/questions/8536732/can-i-hold-git-credentials-in-environment-variables
git config --global credential.helper '!f() { sleep 1; echo "username=${{ github.actor }}"; echo "password=${GH_TOKEN}"; }; f'

git fetch --unshallow origin
git remote add aliyun "https://code.aliyun.com/wang0618/pywebio.git"
git config credential.helper '!f() { sleep 1; echo "username=${ALIYUN_GIT_USER}"; echo "password=${ALIYUN_GIT_PASSWORD}"; }; f'
git branch -D dev-release || true
git checkout -b dev-release

rm .gitignore
git add pywebio/__version__.py
git add pywebio/html/js
git add demos/doc_demos
git config user.email "${ALIYUN_GIT_USER}"
git config user.name "${ALIYUN_GIT_USER}"
git commit --amend --no-edit
git push -f -u aliyun --tags || true
git push -f -u aliyun || true

git commit -m "Build at `date`"
git push -f -u origin dev-release
env:
ALIYUN_GIT_USER: ${{ secrets.ALIYUN_GIT_USER }}
ALIYUN_GIT_PASSWORD: ${{ secrets.ALIYUN_GIT_PASSWORD }}
# This token is provided by Actions, you do not need to create your own token
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pip3 install -U pywebio

开发版安装:
```bash
pip3 install -U https://code.aliyun.com/wang0618/pywebio/repository/archive.zip
pip3 install -U https://github.com/pywebio/PyWebIO/archive/dev-release.zip
```

**系统要求**: PyWebIO要求 Python 版本在 3.5.2 及以上
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pip3 install -U pywebio

Development version:
```bash
pip3 install -U https://code.aliyun.com/wang0618/pywebio/repository/archive.zip
pip3 install -U https://github.com/pywebio/PyWebIO/archive/dev-release.zip
```

**Prerequisites**: PyWebIO requires Python 3.5.2 or newer
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Stable version::

Development version::

pip3 install -U https://code.aliyun.com/wang0618/pywebio/repository/archive.zip
pip3 install -U https://github.com/pywebio/PyWebIO/archive/dev-release.zip

**Prerequisites**: PyWebIO requires Python 3.5.2 or newer

Expand Down

0 comments on commit 291a7d6

Please sign in to comment.