1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-06-29 05:50:41 +00:00

Windows deployment

This commit is contained in:
Luke Ceddia 2020-01-08 20:33:09 +11:00
parent f7ed110b49
commit 85d54db3a9
8 changed files with 45 additions and 29 deletions

View file

@ -1,3 +1,4 @@
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
cd internal\c

17
.ci/build.bat Normal file
View file

@ -0,0 +1,17 @@
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
echo Compiling new QB64
echo From git %APPVEYOR_REPO_COMMIT:~0,7% > internal\version.txt
qb64_bootstrap.exe -x source\qb64.bas -o qb64.exe
IF ERRORLEVEL 1 exit /b 1
del qb64_bootstrap.exe
del /q /s secure-file
del /q /s internal\source\*
move internal\temp\* internal\source\
del /q /s internal\c\libqb\*.o >nul 2>nul
del /q /s internal\c\libqb\*.a >nul 2>nul
del /q /s internal\c\parts\*.o >nul 2>nul
del /q /s internal\c\parts\*.a >nul 2>nul
cd internal\source
del /q /s debug_* recompile_*

View file

@ -8,4 +8,3 @@ appveyor.yml
setup_win.bat
qb64/internal/c/mingw32
qb64/internal/c/mingw64
autosync.sh

View file

@ -1,3 +1,4 @@
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
echo From git %GITHUB_SHA:~0,7% > internal\version.txt

8
.ci/deploy.bat Normal file
View file

@ -0,0 +1,8 @@
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
cd ..
set filename=qb64_%DATE:~10,4%-%DATE:~7,2%-%DATE:~4,2%-%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%_%GITHUB_SHA:~0,7%_win-%PLATFORM%.7z
7z a '-xr@qb64\.ci\common-exclusion.list' '-xr@qb64\.travis\win-exclusion.list' %filename% qb64
scp %filename% remote-server:autobuilds/development/

3
.ci/win-exclusion.list Normal file
View file

@ -0,0 +1,3 @@
setup_lnx.sh
setup_osx.command
qb64_start_osx.command

View file

@ -74,4 +74,19 @@ jobs:
run: .ci/bootstrap.bat
- name: Compile
run: .ci/compile.bat
- name: Set deployment SSH key
if: github.event_name == 'push'
uses: shimataro/ssh-key-action@v1
with:
private-key: ${{ secrets.SSH_KEY }}
public-key: ${{ secrets.SSH_KEY_PUBLIC }}
known-hosts: "qb64.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtmlTks7NPQHwvQiW+P2P8voWXfwYD+EuU39ERiaVw5g/lG/6pU1SKdrRBg2AtaPToPgK/nQyaid3sO2aWO00ixiKB3JPJoVp3nRY8YFi/AtVtVot/xh6+39fjP59tMCnMCbXTKjyMWL0kkwzd+OT8wryRZ/EgjK3vk9UGYzxKSr8G/KKV3GBDrJOdpHT2gNUcDFg6HSMvM860ZOF8n6jKRwp7MM0SpptufuQDgj/LhHcqQtFOqkhW9HXNmZR7IPchb5tsUubbPdSLu043B0ir2x5sCkK9V+inZExPg7KwIZ0yRsSv5esgLaBdyf1UToU3LU4ZM1hWjcJsp2fCBRkhw=="
config: |
Host remote-server
HostName qb64.org
User m6rosupy1q2t
- name: Package and deploy
if: github.event_name == 'push'
run: .ci/deploy.bat

View file

@ -1,28 +0,0 @@
#!/bin/bash
# This script reproduces any commits on upstream to the given remotes, but only on the given branches.
# It is intended to be run via a cron job or similar.
# The merge is --ff-only, so the target branches must not have anything else adding commits to them.
set -e
cd ~/qb64
# Adding a new branch/remote? git checkout -b $remote-$branch $remote/$branch to create a new local.
BRANCHES='development'
REMOTES='origin fellippe qb64team'
git fetch upstream
for branch in $BRANCHES; do
for remote in $REMOTES; do
git checkout -q $remote-$branch
git merge -q --ff-only upstream/$branch
done
done
for remote in $REMOTES; do
refspecs=
for branch in $BRANCHES; do
refspecs="$refspecs $remote-$branch:$branch"
done
git push -q $remote $refspecs
done