mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Switch to BetterDex yml as base
This commit is contained in:
+36
-88
@@ -5,129 +5,85 @@ trigger:
|
|||||||
tags:
|
tags:
|
||||||
include: ['*']
|
include: ['*']
|
||||||
|
|
||||||
|
pr:
|
||||||
|
branches:
|
||||||
|
exclude: ['*']
|
||||||
|
|
||||||
name: $[format('{0:yyyyMMdd\-HHmmss}', pipeline.startTime)]
|
name: $[format('{0:yyyyMMdd\-HHmmss}', pipeline.startTime)]
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- group: 'Secrets (Universal-Team webhook)'
|
- group: 'Secrets (Universal-Team webhook)'
|
||||||
|
- name: CURRENT_DATE
|
||||||
|
value: $[format('{0:yyyyMMdd\-HHmmss}', pipeline.startTime)]
|
||||||
- name: REPOSITORY_NAME
|
- name: REPOSITORY_NAME
|
||||||
value: $(Build.Repository.Name)
|
value: $(Build.Repository.Name)
|
||||||
- name: DEVKITARM
|
- name: COMMIT_TAG
|
||||||
value: /opt/devkitpro/devkitARM
|
value: $(git log --format=%h -1)
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: build3DS
|
|
||||||
displayName: "Build 3DS version"
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
steps:
|
steps:
|
||||||
########################################
|
|
||||||
- script: |
|
- script: |
|
||||||
sudo apt update
|
|
||||||
sudo apt install haveged p7zip-full
|
|
||||||
|
|
||||||
curl -L https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb -o pacman.deb
|
curl -L https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb -o pacman.deb
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install p7zip-full haveged qrencode
|
||||||
sudo dpkg -i pacman.deb
|
sudo dpkg -i pacman.deb
|
||||||
sudo dkp-pacman -Sy
|
sudo dkp-pacman -Sy
|
||||||
sudo dkp-pacman -S 3ds-dev 3ds-curl 3ds-libarchive 3ds-liblzma 3ds-mbedtls 3ds-bzip2 3ds-zlib --noconfirm
|
sudo dkp-pacman -S 3ds-dev --noconfirm
|
||||||
|
|
||||||
curl -L https://github.com/Steveice10/bannertool/releases/download/1.1.0/bannertool.zip -o bannertool.zip
|
curl -L https://github.com/Steveice10/bannertool/releases/download/1.1.0/bannertool.zip -o bannertool.zip
|
||||||
sudo 7z e bannertool.zip linux-x86_64/bannertool
|
sudo 7z e bannertool.zip linux-x86_64/bannertool
|
||||||
sudo chmod +x bannertool
|
sudo chmod +x bannertool
|
||||||
rm bannertool.zip
|
rm bannertool.zip
|
||||||
|
|
||||||
curl -L https://github.com/profi200/Project_CTR/releases/download/0.15/makerom_015_ctrtool.zip -o makerom_015_ctrtool.zip
|
curl -L https://github.com/profi200/Project_CTR/releases/download/0.15/makerom_015_ctrtool.zip -o makerom_015_ctrtool.zip
|
||||||
sudo 7z e makerom_015_ctrtool.zip Linux_x86_64/makerom
|
sudo 7z e makerom_015_ctrtool.zip Linux_x86_64/makerom
|
||||||
sudo chmod +x makerom
|
sudo chmod +x makerom
|
||||||
rm makerom_015_ctrtool.zip
|
rm makerom_015_ctrtool.zip
|
||||||
|
displayName: 'Setup devkitPro'
|
||||||
|
|
||||||
sudo mv makerom /opt/devkitpro/tools/bin
|
|
||||||
sudo mv bannertool /opt/devkitpro/tools/bin
|
|
||||||
displayName: 'Setup environment'
|
|
||||||
########################################
|
|
||||||
- script: |
|
- script: |
|
||||||
|
export PATH=$PATH:$(pwd)
|
||||||
|
export DEVKITPRO="/opt/devkitpro"
|
||||||
|
export DEVKITARM="/opt/devkitpro/devkitARM"
|
||||||
make
|
make
|
||||||
mv Universal-Updater.cia $(Build.ArtifactStagingDirectory)
|
cp Universal-Updater.3dsx $(Build.ArtifactStagingDirectory)
|
||||||
mv Universal-Updater.3dsx $(Build.ArtifactStagingDirectory)
|
cp Universal-Updater.cia $(Build.ArtifactStagingDirectory)
|
||||||
|
echo '##vso[task.setvariable variable=COMMIT_TAG]'$(git log --format=%h -1)
|
||||||
|
echo '##vso[task.setvariable variable=COMMIT_MESSAGE]'$(git log --pretty=format:"%an - %s" -1)
|
||||||
displayName: 'Build Universal-Updater'
|
displayName: 'Build Universal-Updater'
|
||||||
########################################
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: "Publish build to Azure"
|
|
||||||
inputs:
|
|
||||||
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
|
||||||
artifactName: 'build3DS'
|
|
||||||
################################################################################
|
|
||||||
- job: publish
|
|
||||||
displayName: "Publish builds"
|
|
||||||
dependsOn:
|
|
||||||
- buildDS
|
|
||||||
- build3DS
|
|
||||||
- buildSwitch
|
|
||||||
condition: and(succeeded('buildDS'), succeeded('build3DS'), succeeded('buildSwitch'), not(startsWith(variables['Build.SourceBranch'], 'refs/pull')))
|
|
||||||
variables:
|
|
||||||
COMMIT_TAG: $[ dependencies.buildDS.outputs['buildDS.COMMIT_TAG'] ]
|
|
||||||
COMMIT_MESSAGE: $[ dependencies.buildDS.outputs['buildDS.COMMIT_MESSAGE'] ]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
########################################
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
inputs:
|
|
||||||
downloadPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
artifactName: 'buildDS'
|
|
||||||
displayName: "Retrieving artifacts from DS Build"
|
|
||||||
########################################
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
inputs:
|
|
||||||
downloadPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
artifactName: 'build3DS'
|
|
||||||
displayName: "Retrieving artifacts from 3DS build"
|
|
||||||
########################################
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
inputs:
|
|
||||||
downloadPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
artifactName: 'buildSwitch'
|
|
||||||
displayName: "Retrieving artifacts from Switch build"
|
|
||||||
########################################
|
|
||||||
- script: |
|
- script: |
|
||||||
sudo apt install qrencode
|
|
||||||
export CURRENT_DATE=$(date +"%Y%m%d-%H%M%S")
|
|
||||||
echo '##vso[task.setvariable variable=CURRENT_DATE]'$CURRENT_DATE
|
|
||||||
echo '##vso[task.setvariable variable=CURRENT_DATE;isOutput=true]'$CURRENT_DATE
|
|
||||||
|
|
||||||
git config --global user.email "flamekat54@aol.com"
|
git config --global user.email "flamekat54@aol.com"
|
||||||
git config --global user.name "TWLBot"
|
git config --global user.name "TWLBot"
|
||||||
git clone https://$GITHUB_TOKEN@github.com/Universal-Team/extras.git
|
git clone --depth 1 https://$GITHUB_TOKEN@github.com/Universal-Team/extras.git
|
||||||
mkdir extras/builds/Universal-Updater
|
mkdir extras/builds/Universal-Updater/
|
||||||
cd extras/builds/Universal-Updater
|
cd extras/builds/Universal-Updater/
|
||||||
|
cp ../../../Universal-Updater.3dsx Universal-Updater.3dsx
|
||||||
qrencode -o Universal-Updater.png https://github.com/Universal-Team/extras/raw/v$CURRENT_DATE/builds/Universal-Updater/Universal-Updater.cia
|
cp ../../../Universal-Updater.cia Universal-Updater.cia
|
||||||
|
qrencode -o Universal-Updater.png https://github.com/Universal-Team/raw/v$CURRENT_DATE/builds/Universal-Updater/Universal-Updater.cia
|
||||||
cp $(Build.ArtifactStagingDirectory)/*/* .
|
|
||||||
|
|
||||||
git stage .
|
git stage .
|
||||||
git commit -m "Universal-Updater | $(COMMIT_TAG)"
|
git commit -m "Universal-Updater | $(COMMIT_TAG)"
|
||||||
git push origin master
|
git push origin master
|
||||||
git tag v$CURRENT_DATE
|
git tag v$CURRENT_DATE
|
||||||
|
echo '##vso[task.setvariable variable=TWLBOT_COMMIT]'$(git log -1 --format="%H")
|
||||||
echo '##vso[task.setvariable variable=EXTRAS_COMMIT]'$(git log -1 --format="%H")
|
|
||||||
name: commit
|
|
||||||
displayName: "Commit to Universal-Team/extras"
|
displayName: "Commit to Universal-Team/extras"
|
||||||
########################################
|
|
||||||
- task: GitHubRelease@0
|
- task: GitHubRelease@0
|
||||||
displayName: "Release to Universal-Team/extras"
|
displayName: "Release to Universal-Team/extras"
|
||||||
inputs:
|
inputs:
|
||||||
gitHubConnection: TWLBot
|
gitHubConnection: TWLBot
|
||||||
repositoryName: Universal-Team/extras
|
repositoryName: Universal-Team/extras
|
||||||
action: create
|
action: create
|
||||||
target: $(EXTRAS_COMMIT)
|
target: $(TWLBOT_COMMIT)
|
||||||
tagSource: 'manual'
|
tagSource: 'manual'
|
||||||
tag: v$(CURRENT_DATE)
|
tag: v$(CURRENT_DATE)
|
||||||
title: Universal-Updater | $(COMMIT_TAG)
|
title: Universal-Updater | $(COMMIT_TAG)
|
||||||
releaseNotesSource: input
|
releaseNotesSource: input
|
||||||
releaseNotes: $(COMMIT_MESSAGE)
|
releaseNotes: $(COMMIT_MESSAGE)
|
||||||
assets: '$(Build.ArtifactStagingDirectory)/*/*'
|
assets: '$(Build.ArtifactStagingDirectory)/*'
|
||||||
isPreRelease: true
|
isPreRelease: true
|
||||||
addChangeLog: false
|
addChangeLog: false
|
||||||
########################################
|
|
||||||
- task: GitHubRelease@0
|
- task: GitHubRelease@0
|
||||||
displayName: "Release to Universal-Team/Universal-Updater"
|
displayName: "Release to Universal-Team/Universal-Updater"
|
||||||
condition: startsWith(variables['Build.SourceBranchName'], 'v')
|
condition: startsWith(variables['Build.SourceBranchName'], 'v')
|
||||||
@@ -137,23 +93,15 @@ jobs:
|
|||||||
action: edit
|
action: edit
|
||||||
target: '$(Build.SourceVersion)'
|
target: '$(Build.SourceVersion)'
|
||||||
tag: $(Build.SourceBranchName)
|
tag: $(Build.SourceBranchName)
|
||||||
assets: '$(Build.ArtifactStagingDirectory)/*/*'
|
assets: '$(Build.ArtifactStagingDirectory)/**/*'
|
||||||
################################################################################
|
|
||||||
- job: sendWebhook
|
|
||||||
displayName: "Send Webhook"
|
|
||||||
dependsOn: publish
|
|
||||||
variables:
|
|
||||||
CURRENT_DATE: $[ dependencies.publish.outputs['commit.CURRENT_DATE'] ]
|
|
||||||
steps:
|
|
||||||
########################################
|
|
||||||
- script: |
|
- script: |
|
||||||
export IMAGE=https://raw.githubusercontent.com/Universal-Team/extras/v$CURRENT_DATE/builds/Universal-Updater/Universal-Updater.png
|
|
||||||
curl -o send.sh https://raw.githubusercontent.com/Universal-Team/discord-webhooks/master/send-azure.sh
|
curl -o send.sh https://raw.githubusercontent.com/Universal-Team/discord-webhooks/master/send-azure.sh
|
||||||
chmod +x send.sh
|
chmod +x send.sh
|
||||||
|
export IMAGE=https://raw.githubusercontent.com/Universal-Team/extras/v$CURRENT_DATE/builds/Universal-Updater/Universal-Updater.png
|
||||||
./send.sh success $WEBHOOK_URL
|
./send.sh success $WEBHOOK_URL
|
||||||
condition: succeeded()
|
condition: succeeded()
|
||||||
displayName: "Send success webhook"
|
displayName: "Send success webhook"
|
||||||
########################################
|
|
||||||
- script: |
|
- script: |
|
||||||
curl -o send.sh https://raw.githubusercontent.com/Universal-Team/discord-webhooks/master/send-azure.sh
|
curl -o send.sh https://raw.githubusercontent.com/Universal-Team/discord-webhooks/master/send-azure.sh
|
||||||
chmod +x send.sh
|
chmod +x send.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user