Nothing here

This commit is contained in:
Pig Fang 2019-07-05 19:45:30 +08:00
parent cd493b946f
commit dffe7fc060
5 changed files with 1 additions and 113 deletions

View File

@ -1,112 +0,0 @@
trigger:
- master
pr: none
pool:
vmImage: 'ubuntu-latest'
variables:
RELEASE_TAG: '4.3.5'
steps:
- script: |
(git log -1 --pretty="%s" | grep -P 'Bump version to \d+\.\d+\.\d+') > /dev/null 2>&1
if [ $? -eq 0 ]
then
sudo update-alternatives --set php /usr/bin/php7.3
php -version
fi
displayName: 'Use PHP version 7.3'
- script: |
(git log -1 --pretty="%s" | grep -P 'Bump version to \d+\.\d+\.\d+') > /dev/null 2>&1
if [ $? -eq 0 ]
then
composer install --no-interaction --prefer-dist --no-dev
rm -rf vendor/bin
fi
displayName: 'composer install'
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
(git log -1 --pretty="%s" | grep -P 'Bump version to \d+\.\d+\.\d+') > /dev/null 2>&1
if [ $? -eq 0 ]
then
yarn
yarn build
fi
displayName: 'Build front end'
- script: |
(git log -1 --pretty="%s" | grep -P 'Bump version to \d+\.\d+\.\d+') > /dev/null 2>&1
if [ $? -eq 0 ]
then
composer install --no-interaction --prefer-dist --no-dev
rm -rf vendor/bin
fi
displayName: 'Archive files'
- task: InstallSSHKey@0
inputs:
hostName: 'ssh.dev.azure.com'
sshPublicKey: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCq3Lv+bo4SbS5JWYvJz1SH1+m1tXFap0cUChE15NA3s0DRoZj1oO7rgBBXKGmlLeP+wUzgGmDBexrqs/JsYzQfjQcZrnNvX2CRhslHxjs8EcjSjbMbjC9aBmK8taRNq6Mw3BD/393yvldsJEFCTezlBMv5ZR5Rz3VamzjT8/nFnGhdMXVaDwZZiwMv/bA6vCKXxGOqpqKaGc7A+EsvMLEWtzpcsU69bRXxb4OGKone+SJlRqP9h6eaHcfhLzWTSywESQsAOo16VaIJ+nS9Y+lTEy1oEqCCJnQ3z2JrP3LYiaZ2UFVbHYbvUl1KHGzNfMgkXG5gFZwARJu1L07d4oR4vVqZ98G0A4KDzGCg+ltMc7gz3a6QxNqYLwBbotvtAqKd3+0d7BcJ47WXznebbYv509OUaXxtLMQwIoWsDzBGj230u2XY20XnK64ceb8K1IqoHZL74JLfxyidyxWsQ4UPiOw62CY/9tX5+qS4qyDgps1zaybYAVM+/K62eu06CJaXxw4P51QLw3Qk2Awoi3gNcLwVjwjVNVi0qB7oXklNvL949+fesNgK3l77cIlC3xMEd+K9RbNL1xKU5VSFw4bc/+quQd4GXtajmPEgdxloP5q5nalN72rUThDpcJaXDot0LqxWTyMV45393Vg136KqVJr+I8UCTfI2yrqwYf6+dw== gplane@BS-dev'
sshKeySecureFile: 'ssh-key'
- script: |
(git log -1 --pretty="%s" | grep -P 'Bump version to \d+\.\d+\.\d+') > /dev/null 2>&1
if [ $? -eq 0 ]
then
zip -9 -r blessing-skin-server-$RELEASE_TAG.zip \
app \
bootstrap \
config \
database \
plugins \
public \
resources/lang \
resources/views \
resources/misc \
routes \
storage \
vendor \
.env.example \
artisan \
LICENSE \
README.md \
README_EN.md
mkdir dist
cd dist
cp ../blessing-skin-server-$RELEASE_TAG.zip blessing-skin-server-$RELEASE_TAG.zip
echo "{\"spec\":2,\"php\":\"7.1.8\",\"latest\":\"$RELEASE_TAG\",\"url\":\"https://dev.azure.com/blessing-skin/51010f6d-9f99-40f1-a262-0a67f788df32/_apis/git/repositories/a9ff8df7-6dc3-4ff8-bb22-4871d3a43936/Items?path=%2Fblessing-skin-server-$RELEASE_TAG.zip\"}" > update_2.json
git config --global user.email "g-plane@hotmail.com"
git config --global user.name "Pig Fang"
git init
git add .
git commit -m "Publish"
git remote add origin git@ssh.dev.azure.com:v3/blessing-skin/Blessing%20Skin%20Server/Blessing%20Skin%20Server
git push -f origin master
cd ..
fi
displayName: 'Create update source info'
- script: |
(cat resources/misc/changelogs/zh_CN/$RELEASE_TAG.md && cat resources/misc/changelogs/en/$RELEASE_TAG.md) > changelog.md
displayName: 'Generate changelog'
- task: GitHubRelease@0
displayName: 'Create GitHub Release'
inputs:
gitHubConnection: g-plane
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'auto'
releaseNotesSource: 'file'
releaseNotesFile: 'changelog.md'
assets: 'dist/blessing-skin-server-$(RELEASE_TAG).zip'
addChangeLog: false

View File

@ -20,7 +20,7 @@ function git(args: readonly string[]) {
}
(async () => {
const files = ['./config/app.php', './package.json', './azure-pipelines.yml']
const files = ['./config/app.php', './package.json']
await Promise.all(files.map(saveVersion))
await git(['add'].concat(files))
await git(['commit', '-m', `Bump version to ${next}`])