Compare commits
8 Commits
master
...
build/1000
Author | SHA1 | Date |
---|---|---|
gilesb | 129e4fbdf5 | |
giles | ba134eeaad | |
giles | f1cee92c99 | |
gilesb | 20088da9bb | |
gilesb | 589acdaee4 | |
gilesb | 2c7937596c | |
gilesb | eda88259de | |
gilesb | 836c1edfef |
|
@ -43,13 +43,24 @@ jobs:
|
||||||
- name: push
|
- name: push
|
||||||
run: |
|
run: |
|
||||||
if [[ $(git branch -r | grep -Fx " origin/${{ env.DEVELOPMENT_BRANCH }}" | wc -c) -eq 0 ]]; then
|
if [[ $(git branch -r | grep -Fx " origin/${{ env.DEVELOPMENT_BRANCH }}" | wc -c) -eq 0 ]]; then
|
||||||
ls
|
git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned
|
||||||
git log -5
|
git -C ../cloned fetch origin #--depth=1
|
||||||
git status
|
git -C ../cloned branch -r
|
||||||
git rebase -Xtheirs origin/master
|
git -C ../cloned checkout master || git -C ../cloned checkout -b master
|
||||||
ls
|
mv ../cloned/.git ..
|
||||||
git log -4
|
rm -rf ../cloned
|
||||||
|
cp -r . ../cloned
|
||||||
|
rm -rf ../cloned/.git
|
||||||
|
mv ../.git ../cloned
|
||||||
|
mv .git/config ../cloned/.git
|
||||||
|
rm -r ./*
|
||||||
|
rm -r .git
|
||||||
|
mv ../cloned/* .
|
||||||
|
mv ../cloned/.git .
|
||||||
git status
|
git status
|
||||||
|
git checkout -b ${{ env.DEVELOPMENT_BRANCH }}
|
||||||
|
git add -A
|
||||||
|
git commit -a -m "${{ github.ref_name }} -> ${{ env.DEVELOPMENT_BRANCH }}"
|
||||||
echo no development branch so pushing
|
echo no development branch so pushing
|
||||||
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
|
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
|
||||||
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea;
|
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea;
|
||||||
|
@ -64,9 +75,9 @@ jobs:
|
||||||
echo 'pushed new branch and created pr';
|
echo 'pushed new branch and created pr';
|
||||||
else
|
else
|
||||||
if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then
|
if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then
|
||||||
#git rebase -Xtheirs origin/${{ env.DEVELOPMENT_BRANCH }}
|
|
||||||
git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned
|
git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned
|
||||||
git -C ../cloned fetch origin #--depth=1
|
git -C ../cloned fetch origin #--depth=1
|
||||||
|
git -C ../cloned branch -r
|
||||||
git -C ../cloned checkout $DEVELOPMENT_BRANCH || git -C ../cloned checkout -b $DEVELOPMENT_BRANCH
|
git -C ../cloned checkout $DEVELOPMENT_BRANCH || git -C ../cloned checkout -b $DEVELOPMENT_BRANCH
|
||||||
mv ../cloned/.git ..
|
mv ../cloned/.git ..
|
||||||
rm -rf ../cloned
|
rm -rf ../cloned
|
||||||
|
@ -78,6 +89,7 @@ jobs:
|
||||||
rm -r .git
|
rm -r .git
|
||||||
mv ../cloned/* .
|
mv ../cloned/* .
|
||||||
mv ../cloned/.git .
|
mv ../cloned/.git .
|
||||||
|
git status
|
||||||
git add -A
|
git add -A
|
||||||
git commit -a -m "${{ github.ref_name }} -> ${{ env.DEVELOPMENT_BRANCH }}"
|
git commit -a -m "${{ github.ref_name }} -> ${{ env.DEVELOPMENT_BRANCH }}"
|
||||||
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
|
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
|
|
@ -1,13 +0,0 @@
|
||||||
name: Changelog
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- created
|
|
||||||
jobs:
|
|
||||||
changelog:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: "✏️ Generate release changelog"
|
|
||||||
uses: heinrichreimer/action-github-changelog-generator@v2.3
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.BOT_TOKEN }}
|
|
|
@ -15,11 +15,6 @@ jobs:
|
||||||
fetch-depth: '10'
|
fetch-depth: '10'
|
||||||
- env: env
|
- env: env
|
||||||
run: printenv
|
run: printenv
|
||||||
- name: get tea
|
|
||||||
run: |
|
|
||||||
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output ../tea
|
|
||||||
chmod +x ../tea
|
|
||||||
../tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }}
|
|
||||||
- uses: http://sigyl.com:3000/actions/setup-node@v3
|
- uses: http://sigyl.com:3000/actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
@ -39,7 +34,8 @@ jobs:
|
||||||
echo ::set-env name=BUILD_BRANCH::${firstString/develop\//"$secondString"\/}
|
echo ::set-env name=BUILD_BRANCH::${firstString/develop\//"$secondString"\/}
|
||||||
- name: status
|
- name: status
|
||||||
run: |
|
run: |
|
||||||
ls
|
git branch -r
|
||||||
|
echo $(git branch -r | grep -Fx " origin/${{ env.BUILD_BRANCH }}" | wc -c)
|
||||||
- name: push
|
- name: push
|
||||||
run: |
|
run: |
|
||||||
git add -A
|
git add -A
|
||||||
|
@ -48,9 +44,9 @@ jobs:
|
||||||
git push origin HEAD:${{ env.BUILD_BRANCH }};
|
git push origin HEAD:${{ env.BUILD_BRANCH }};
|
||||||
else
|
else
|
||||||
if [[ $(git diff origin/${{ env.BUILD_BRANCH }} | wc -c) -ne 0 ]]; then
|
if [[ $(git diff origin/${{ env.BUILD_BRANCH }} | wc -c) -ne 0 ]]; then
|
||||||
#git rebase -Xtheirs origin/${{ env.BUILD_BRANCH }}
|
|
||||||
git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned
|
git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned
|
||||||
git -C ../cloned fetch origin #--depth=1
|
git -C ../cloned fetch origin #--depth=1
|
||||||
|
git -C ../cloned branch -r
|
||||||
git -C ../cloned checkout $BUILD_BRANCH || git -C ../cloned checkout -b $BUILD_BRANCH
|
git -C ../cloned checkout $BUILD_BRANCH || git -C ../cloned checkout -b $BUILD_BRANCH
|
||||||
mv ../cloned/.git ..
|
mv ../cloned/.git ..
|
||||||
rm -rf ../cloned
|
rm -rf ../cloned
|
||||||
|
@ -62,6 +58,7 @@ jobs:
|
||||||
rm -r .git
|
rm -r .git
|
||||||
mv ../cloned/* .
|
mv ../cloned/* .
|
||||||
mv ../cloned/.git .
|
mv ../cloned/.git .
|
||||||
|
git status
|
||||||
git add -A
|
git add -A
|
||||||
git commit -a -m "${{ github.ref_name }} -> ${{ env.BUILD_BRANCH }} "
|
git commit -a -m "${{ github.ref_name }} -> ${{ env.BUILD_BRANCH }} "
|
||||||
git push origin HEAD:${{ env.BUILD_BRANCH }}
|
git push origin HEAD:${{ env.BUILD_BRANCH }}
|
||||||
|
@ -71,19 +68,26 @@ jobs:
|
||||||
fi;
|
fi;
|
||||||
- name: make PR
|
- name: make PR
|
||||||
run: |
|
run: |
|
||||||
../tea pr ls -f=base,head -o=csv
|
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea
|
||||||
if [[ $(../tea pr ls -f=base,head -o=csv | grep "\"master\",\"${{ github.ref_name }}\"" | head -c1 | wc -c) -eq 0 ]]; then
|
chmod +x ./tea
|
||||||
../tea pr c --base=master --head=${{ github.ref_name }} --description="
|
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }}
|
||||||
|
if [[ $(./tea pr ls -f=base,head -o=csv | grep "\"master\",\"${{ github.ref_name }}\"" | head -c1 | wc -c) -eq 0 ]]; then
|
||||||
|
./tea pr c --base=master --head=${{ github.ref_name }} --description="
|
||||||
development pull request
|
development pull request
|
||||||
this PR is will been built on [${{ github.ref_name }}](${{ github.serverUrl }}/${{ github.repository }}/src/branch/${{ env.BUILD_BRANCH }})
|
this PR is will been built on [${{ github.ref_name }}](${{ github.serverUrl }}/${{ github.repository }}/src/branch/${{ env.BUILD_BRANCH }})
|
||||||
" -t="WIP: ${{ github.event.head_commit.message }}"
|
" -t="WIP: ${{ github.event.head_commit.message }}"
|
||||||
fi
|
fi
|
||||||
- name: get PR number
|
- name: get PR number
|
||||||
run: |
|
run: |
|
||||||
pr=$(../tea pr ls -f=base,head,index -o csv | grep "\"master\",\"${{ github.ref_name }}\"" | tr -d ' ' | tr "," "\n" | head -n 4 | tail -1)
|
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea
|
||||||
|
chmod +x ./tea
|
||||||
|
pr=$(./tea pr ls -f=base,head,index -o csv | grep "\"master\",\"${{ github.ref_name }}\"" | tr -d ' ' | tr "," "\n" | head -n 4 | tail -1)
|
||||||
export PR="${pr//[\"\'\`]/}"
|
export PR="${pr//[\"\'\`]/}"
|
||||||
echo ::set-env name=PR::$PR
|
echo ::set-env name=PR::$PR
|
||||||
|
rm ./tea
|
||||||
- name: make pull request comment
|
- name: make pull request comment
|
||||||
run: |
|
run: |
|
||||||
../tea c $PR "this branch has been built on [${{ env.BUILD_BRANCH }}](${{ github.serverUrl }}/${{ github.repository }}/src/branch/${{ env.BUILD_BRANCH }})"
|
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea
|
||||||
|
chmod +x ./tea
|
||||||
|
./tea c $PR "this branch has been built on [${{ env.BUILD_BRANCH }}](${{ github.serverUrl }}/${{ github.repository }}/src/branch/${{ env.BUILD_BRANCH }})"
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
name: build-develop-branch
|
||||||
|
run-name: ${{ github.actor }} is learning GitHub Actions
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'develop/**'
|
||||||
|
jobs:
|
||||||
|
build-branch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# https://github.com/RouxAntoine/checkout/tree/v3.5.4
|
||||||
|
- uses: http://sigyl.com:3000/actions/checkout@v3.5.4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.BOT_TOKEN }}
|
||||||
|
fetch-depth: '10'
|
||||||
|
- env: env
|
||||||
|
run: printenv
|
||||||
|
- uses: http://sigyl.com:3000/actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
- uses: http://sigyl.com:3000/actions/batch2yaml@master
|
||||||
|
with:
|
||||||
|
action: xml
|
||||||
|
path: '.'
|
||||||
|
- run: git fetch
|
||||||
|
- name: config
|
||||||
|
run: |
|
||||||
|
git config --global user.name "${{ github.actor }}"
|
||||||
|
git config --global user.email "${{ github.event.pusher.email }}"
|
||||||
|
- name: get build branch name
|
||||||
|
run: |
|
||||||
|
firstString=${{ github.ref_name }}
|
||||||
|
secondString="build"
|
||||||
|
echo ::set-env name=BUILD_BRANCH::${firstString/develop\//"$secondString"\/}
|
||||||
|
- name: status
|
||||||
|
run: |
|
||||||
|
git branch -r
|
||||||
|
echo $(git branch -r | grep -Fx " origin/${{ env.BUILD_BRANCH }}" | wc -c)
|
||||||
|
- name: push
|
||||||
|
run: |
|
||||||
|
git add -A
|
||||||
|
git commit -a -m "${{ github.ref_name }} -> ${{ env.BUILD_BRANCH }} "
|
||||||
|
if [[ $(git branch -r | grep -Fx " origin/${{ env.BUILD_BRANCH }}" | wc -c) -eq 0 ]]; then
|
||||||
|
git push origin HEAD:${{ env.BUILD_BRANCH }};
|
||||||
|
else
|
||||||
|
if [[ $(git diff origin/${{ env.BUILD_BRANCH }} | wc -c) -ne 0 ]]; then
|
||||||
|
git rebase origin/${{ env.BUILD_BRANCH }}
|
||||||
|
git push origin HEAD:${{ env.BUILD_BRANCH }}
|
||||||
|
else
|
||||||
|
echo 'no changes so no push'
|
||||||
|
fi;
|
||||||
|
fi;
|
||||||
|
- name: make PR
|
||||||
|
run: |
|
||||||
|
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea
|
||||||
|
chmod +x ./tea
|
||||||
|
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }}
|
||||||
|
if [[ $(./tea pr ls -f=base,head -o=csv | grep "\"master\",\"${{ github.ref_name }}\"" | head -c1 | wc -c) -eq 0 ]]; then
|
||||||
|
./tea pr c --base=master --head=${{ github.ref_name }} --description="
|
||||||
|
development pull request
|
||||||
|
this PR is will been built on [${{ github.ref_name }}](${{ github.serverUrl }}/${{ github.repository }}/src/branch/${{ env.BUILD_BRANCH }})
|
||||||
|
" -t="WIP: ${{ github.event.head_commit.message }}"
|
||||||
|
fi
|
||||||
|
- name: get PR number
|
||||||
|
run: |
|
||||||
|
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea
|
||||||
|
chmod +x ./tea
|
||||||
|
pr=$(./tea pr ls -f=base,head,index -o csv | grep "\"master\",\"${{ github.ref_name }}\"" | tr -d ' ' | tr "," "\n" | head -n 4 | tail -1)
|
||||||
|
export PR="${pr//[\"\'\`]/}"
|
||||||
|
echo ::set-env name=PR::$PR
|
||||||
|
rm ./tea
|
||||||
|
- name: make pull request comment
|
||||||
|
run: |
|
||||||
|
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea
|
||||||
|
chmod +x ./tea
|
||||||
|
./tea c $PR "this branch has been built on [${{ env.BUILD_BRANCH }}](${{ github.serverUrl }}/${{ github.repository }}/src/branch/${{ env.BUILD_BRANCH }})"
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
name: convert-to-yml
|
||||||
|
run-name: ${{ github.actor }} is learning GitHub Actions
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'format/**'
|
||||||
|
jobs:
|
||||||
|
develop-branch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# https://github.com/RouxAntoine/checkout/tree/v3.5.4
|
||||||
|
- uses: http://sigyl.com:3000/actions/checkout@v3.5.4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.BOT_TOKEN }}
|
||||||
|
fetch-depth: '10'
|
||||||
|
- uses: http://sigyl.com:3000/actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
- uses: http://sigyl.com:3000/actions/batch2yaml@master
|
||||||
|
with:
|
||||||
|
action: yml
|
||||||
|
path: '.'
|
||||||
|
- name: get development branch name
|
||||||
|
run: |
|
||||||
|
firstString=${{ github.ref_name }}
|
||||||
|
secondString="develop"
|
||||||
|
echo ::set-env name=DEVELOPMENT_BRANCH::${firstString/format\//"$secondString"\/}
|
||||||
|
git status
|
||||||
|
- name: clone
|
||||||
|
run: |
|
||||||
|
git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned
|
||||||
|
git -C ../cloned fetch origin #--depth=1
|
||||||
|
git -C ../cloned branch -r
|
||||||
|
git -C ../cloned checkout $DEVELOPMENT_BRANCH || git -C ../cloned checkout -b $DEVELOPMENT_BRANCH
|
||||||
|
mv ../cloned/.git ..
|
||||||
|
rm -rf ../cloned
|
||||||
|
cp -r . ../cloned
|
||||||
|
rm -rf ../cloned/.git
|
||||||
|
mv ../.git ../cloned
|
||||||
|
mv .git/config ../cloned/.git
|
||||||
|
rm -r ./*
|
||||||
|
rm -r .git
|
||||||
|
mv ../cloned/* .
|
||||||
|
mv ../cloned/.git .
|
||||||
|
- name: GIT commit and push all changed files
|
||||||
|
env:
|
||||||
|
CI_COMMIT_MESSAGE: converted to yml for review.
|
||||||
|
CI_COMMIT_AUTHOR: Continuous Integration
|
||||||
|
run: |
|
||||||
|
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
|
||||||
|
git config --global user.email "username@users.noreply.github.com"
|
||||||
|
git add -A
|
||||||
|
git status
|
||||||
|
git commit -a -m "${{ github.ref_name }} -> ${{ env.DEVELOPMENT_BRANCH }} "
|
||||||
|
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }}
|
||||||
|
#- name: push development
|
||||||
|
# env:
|
||||||
|
# CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts
|
||||||
|
# CI_COMMIT_AUTHOR: Continuous Integration
|
||||||
|
# run: |
|
||||||
|
# git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
|
||||||
|
# git config --global user.email "username@users.noreply.github.com"
|
||||||
|
# git fetch --depth=1
|
||||||
|
# git add -A
|
||||||
|
# git commit -m "${{ env.CI_COMMIT_MESSAGE }}
|
||||||
|
#
|
||||||
|
# converted from batch"
|
||||||
|
# git merge origin/master --strategy-option=ours --allow-unrelated
|
||||||
|
# git push -f origin HEAD:${{ env.DEVELOPMENT_BRANCH }}
|
||||||
|
- name: make pull request
|
||||||
|
#git fetch
|
||||||
|
# git merge origin/master --allow-unrelated-histories --strategy-option=ours
|
||||||
|
# git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }}
|
||||||
|
run: |
|
||||||
|
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea
|
||||||
|
chmod +x ./tea
|
||||||
|
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }}
|
||||||
|
if [[ $(./tea pr ls -f=base,head | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | head -c1 | wc -c) -eq 0 ]]; then
|
||||||
|
./tea pr c --base=master --head=${{ env.DEVELOPMENT_BRANCH }} --description="development pull request" -t="WIP: ${{ github.event.head_commit.message }}"
|
||||||
|
fi
|
||||||
|
rm ./tea
|
|
@ -1,24 +0,0 @@
|
||||||
name: master-pushed
|
|
||||||
run-name: ${{ github.actor }} is learning GitHub Actions
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
new release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: get tea
|
|
||||||
run: |
|
|
||||||
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output ../tea
|
|
||||||
chmod +x ../tea
|
|
||||||
../tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }}
|
|
||||||
- uses: http://sigyl.com:3000/actions/checkout@v3.5.4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.BOT_TOKEN }}
|
|
||||||
- name: bump release
|
|
||||||
run: |
|
|
||||||
export version=$(../tea r ls -o=simple | head -n 1 | tr " " "\n" | head -n 1 | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')
|
|
||||||
../tea r c --note="this isrelease ${version}" --tag=${version} --title=${version} --target=${{ github.sha }}
|
|
||||||
echo ::set-env name=VERSION::$version
|
|
|
@ -6,11 +6,10 @@ on:
|
||||||
- closed
|
- closed
|
||||||
- deleted
|
- deleted
|
||||||
branches:
|
branches:
|
||||||
- master
|
- 'master'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
delete-develop:
|
delete:
|
||||||
if: ${{ ! startsWith(github.head_ref, 'develop/') }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: http://sigyl.com:3000/actions/checkout@v3.5.4
|
- uses: http://sigyl.com:3000/actions/checkout@v3.5.4
|
||||||
|
@ -30,6 +29,19 @@ jobs:
|
||||||
firstString=${{ github.head_ref }}
|
firstString=${{ github.head_ref }}
|
||||||
secondString="build"
|
secondString="build"
|
||||||
echo ::set-env name=BUILD_BRANCH::${firstString/develop\//"$secondString"\/}s
|
echo ::set-env name=BUILD_BRANCH::${firstString/develop\//"$secondString"\/}s
|
||||||
- name: delete build branch
|
if_merged:
|
||||||
run: git push origin --delete ${{ env.BUILD_BRANCH }}
|
if: github.event.pull_request.merged == true
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: http://sigyl.com:3000/actions/checkout@v3.5.4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.BOT_TOKEN }}
|
||||||
|
- name: delete develop branch
|
||||||
|
id: delete_develop_branch
|
||||||
|
run: git push origin --delete ${{ github.head_ref }}
|
||||||
|
continue-on-error: true
|
||||||
|
- uses: mainmatter/continue-on-error-comment@v1
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.BOT_TOKEN }}
|
||||||
|
outcome: ${{ steps.delete_develop_branch.outcome }}
|
||||||
|
test-id: Error code ${{ matrix.code }}
|
|
@ -1,23 +0,0 @@
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [master]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prettier:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: http://sigyl.com:3000/actions/checkout@v3.5.4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.BOT_TOKEN }}
|
|
||||||
# Make sure the actual branch is checked out when running on pull requests
|
|
||||||
ref: ${{ github.head_ref }}
|
|
||||||
# This is important to fetch the changes to the previous commit
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Prettify code
|
|
||||||
uses: creyD/prettier_action@v4.3
|
|
||||||
with:
|
|
||||||
# This part is also where you can pass other options, for example:
|
|
||||||
prettier_options: --write **/*.{js,md}
|
|
||||||
only_changed: true
|
|
|
@ -31,4 +31,4 @@ jobs:
|
||||||
git config --global user.email "username@users.noreply.github.com"
|
git config --global user.email "username@users.noreply.github.com"
|
||||||
git add -A
|
git add -A
|
||||||
git commit -a -m "${{ github.ref_name }} -> refs/heads/deployed/${{ github.ref_name }} "
|
git commit -a -m "${{ github.ref_name }} -> refs/heads/deployed/${{ github.ref_name }} "
|
||||||
git push -f origin HEAD:refs/heads/deployed/${{ github.ref_name }}
|
git push origin HEAD:refs/heads/deployed/${{ github.ref_name }}
|
|
@ -1,28 +0,0 @@
|
||||||
name: tea
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
secrets:
|
|
||||||
token:
|
|
||||||
required: true
|
|
||||||
jobs:
|
|
||||||
tea:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: get tea
|
|
||||||
run: |
|
|
||||||
echo tea please!
|
|
||||||
#curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output ../tea
|
|
||||||
#chmod +x ../tea
|
|
||||||
#../tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.token }}
|
|
||||||
#echo thank you!
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: http://sigyl.com:3000/actions/checkout@v3.5.4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.BOT_TOKEN }}
|
|
||||||
fetch-depth: '10'
|
|
||||||
- name: ls
|
|
||||||
run: ls
|
|
|
@ -18,7 +18,8 @@ yml -> xml
|
||||||
push deployed
|
push deployed
|
||||||
|
|
||||||
|
|
||||||
pull to production PC and import
|
|
||||||
|
pull to production PC and import.
|
||||||
|
|
||||||
pull to development, import, modify, export
|
pull to development, import, modify, export
|
||||||
push from development to format branch
|
push from development to format branch
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
160
try.js
160
try.js
|
@ -1,160 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import ReactVersion from "shared/ReactVersion";
|
|
||||||
import { LegacyRoot } from "react-reconciler/src/ReactRootTags";
|
|
||||||
import {
|
|
||||||
createContainer,
|
|
||||||
updateContainer,
|
|
||||||
injectIntoDevTools,
|
|
||||||
} from "react-reconciler/src/ReactFiberReconciler";
|
|
||||||
import Transform from "art/core/transform";
|
|
||||||
import Mode from "art/modes/current";
|
|
||||||
import FastNoSideEffects from "art/modes/fast-noSideEffects";
|
|
||||||
|
|
||||||
import { TYPES, childrenAsString } from "./ReactARTInternals";
|
|
||||||
|
|
||||||
Mode.setCurrent(
|
|
||||||
// Change to 'art/modes/dom' for easier debugging via SVG
|
|
||||||
FastNoSideEffects,
|
|
||||||
);
|
|
||||||
|
|
||||||
/** Declarative fill-type objects; API design not finalized */
|
|
||||||
|
|
||||||
const slice = Array.prototype.slice;
|
|
||||||
|
|
||||||
class LinearGradient {
|
|
||||||
constructor(stops, x1, y1, x2, y2) {
|
|
||||||
this._args = slice.call(arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
applyFill(node) {
|
|
||||||
node.fillLinear.apply(node, this._args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class RadialGradient {
|
|
||||||
constructor(stops, fx, fy, rx, ry, cx, cy) {
|
|
||||||
this._args = slice.call(arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
applyFill(node) {
|
|
||||||
node.fillRadial.apply(node, this._args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Pattern {
|
|
||||||
constructor(url, width, height, left, top) {
|
|
||||||
this._args = slice.call(arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
applyFill(node) {
|
|
||||||
node.fillImage.apply(node, this._args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** React Components */
|
|
||||||
|
|
||||||
class Surface extends React.Component {
|
|
||||||
componentDidMount() {
|
|
||||||
const { height, width } = this.props;
|
|
||||||
|
|
||||||
this._surface = Mode.Surface(+width, +height, this._tagRef);
|
|
||||||
|
|
||||||
this._mountNode = createContainer(
|
|
||||||
this._surface,
|
|
||||||
LegacyRoot,
|
|
||||||
null,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
"",
|
|
||||||
);
|
|
||||||
updateContainer(this.props.children, this._mountNode, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState) {
|
|
||||||
const props = this.props;
|
|
||||||
|
|
||||||
if (props.height !== prevProps.height || props.width !== prevProps.width) {
|
|
||||||
this._surface.resize(+props.width, +props.height);
|
|
||||||
}
|
|
||||||
|
|
||||||
updateContainer(this.props.children, this._mountNode, this);
|
|
||||||
|
|
||||||
if (this._surface.render) {
|
|
||||||
this._surface.render();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
updateContainer(null, this._mountNode, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
// This is going to be a placeholder because we don't know what it will
|
|
||||||
// actually resolve to because ART may render canvas, vml or svg tags here.
|
|
||||||
// We only allow a subset of properties since others might conflict with
|
|
||||||
// ART's properties.
|
|
||||||
const props = this.props;
|
|
||||||
|
|
||||||
// TODO: ART's Canvas Mode overrides surface title and cursor
|
|
||||||
const Tag = Mode.Surface.tagName;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Tag
|
|
||||||
ref={(ref) => (this._tagRef = ref)}
|
|
||||||
accessKey={props.accessKey}
|
|
||||||
className={props.className}
|
|
||||||
draggable={props.draggable}
|
|
||||||
role={props.role}
|
|
||||||
style={props.style}
|
|
||||||
tabIndex={props.tabIndex}
|
|
||||||
title={props.title}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Text extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
// We allow reading these props. Ideally we could expose the Text node as
|
|
||||||
// ref directly.
|
|
||||||
["height", "width", "x", "y"].forEach((key) => {
|
|
||||||
Object.defineProperty(this, key, {
|
|
||||||
get: function () {
|
|
||||||
return this._text ? this._text[key] : undefined;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
render() {
|
|
||||||
// This means you can't have children that render into strings...
|
|
||||||
const T = TYPES.TEXT;
|
|
||||||
return (
|
|
||||||
<T {...this.props} ref={(t) => (this._text = t)}>
|
|
||||||
{childrenAsString(this.props.children)}
|
|
||||||
</T>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
injectIntoDevTools({
|
|
||||||
findFiberByHostInstance: () => null,
|
|
||||||
bundleType: __DEV__ ? 1 : 0,
|
|
||||||
version: ReactVersion,
|
|
||||||
rendererPackageName: "react-art",
|
|
||||||
});
|
|
||||||
|
|
||||||
/** API */
|
|
||||||
|
|
||||||
export const ClippingRectangle = TYPES.CLIPPING_RECTANGLE;
|
|
||||||
export const Group = TYPES.GROUP;
|
|
||||||
export const Shape = TYPES.SHAPE;
|
|
||||||
export const Path = Mode.Path;
|
|
||||||
export { LinearGradient, Pattern, RadialGradient, Surface, Text, Transform };
|
|
Loading…
Reference in New Issue