Task to auto update the criticial dot files.

This commit is contained in:
Yao Wei Tjong 姚伟忠 2020-09-14 18:45:52 +08:00
parent 6cc52c6240
commit fbff271bfc
No known key found for this signature in database
GPG Key ID: 0296FF46D1EE7308
4 changed files with 26 additions and 71 deletions

View File

@ -75,4 +75,16 @@ task :source_checksum do
puts "::set-output name=hexdigest::#{sha256_final.hexdigest}"
end
desc 'Ensure all dot files are up-to-date'
task :update_dot_files do
system 'bash', '-c', %q(
perl -ne 'undef $/; print $1 if /(Build Option.*?(?=\n\n))/s' Docs/GettingStarted.dox |tail -n +3 |cut -d'|' -f2 |tr -d [:blank:] >script/.build-options && \
echo URHO3D_LINT >>script/.build-options && \
cat script/.build-options <(perl -ne 'while (/([A-Z_]+):.+?/g) {print "$1\n"}' .github/workflows/main.yml) \
<(perl -ne 'while (/ENV\[\x27(\w+)\x27\]/g) {print "$1\n"}' Rakefile) \
<(perl -ne 'while (/System.getenv\\("(\w+)"\\)/g) {print "$1\n"}' android/urho3d-lib/build.gradle.kts) \
|sort |uniq |grep -Ev '^(HOME|PATH)$' >script/.env-file
) or abort 'Failed to update dot files'
end
# vi: set ts=2 sw=2 expandtab:

View File

@ -91,7 +91,7 @@ jobs:
${{ matrix.platform }}-${{ matrix.lib-type }}-${{ matrix.architecture }}-${{ matrix.build-type }}-${{ env.DBE_TAG }}
${{ matrix.platform }}-${{ matrix.lib-type }}-${{ matrix.architecture }}-${{ matrix.build-type }}
- name: DBE
run: script/dockerized.sh ${PLATFORM/-*} env
run: script/dockerized.sh ${PLATFORM/-*} env && rake update_dot_files
- name: CMake
run: script/dockerized.sh ${PLATFORM/-*} rake ci cmake
if: matrix.platform != 'android' && matrix.platform != 'linux-clang-format'

View File

@ -4,7 +4,6 @@ MINGW
WEB
IOS
TVOS
URHO3D_LINT
URHO3D_64BIT
URHO3D_ANGELSCRIPT
URHO3D_LUA
@ -78,3 +77,4 @@ EMSCRIPTEN_TOTAL_MEMORY
EMSCRIPTEN_SHARE_DATA
EMSCRIPTEN_EMRUN_BROWSER
OPENSSL_ROOT_DIR
URHO3D_LINT

View File

@ -1,37 +1,20 @@
HOST
PLATFORM
BUILD_TYPE
LIB_TYPE
ARCH
GRAPHICS_API
ANDROID
ANDROID_CCACHE
APPLETVOS_DEPLOYMENT_TARGET
APPVEYOR
APPVEYOR_REPO_BRANCH
APPVEYOR_REPO_COMMIT
APPVEYOR_REPO_NAME
ARCH
ARM
ARM_ABI_FLAGS
ARM_PREFIX
ARM_SYSROOT
baseline
BINTRAY_KEY
bintrayUpload
BINTRAY_USER
CC
ccache
CCACHE_COMPRESS
CCACHE_SLOPPINESS
BUILD_PARAMS
BUILD_TREE
BUILD_TYPE
CI
cmake
CMAKE_BUILD_TYPE
CMAKE_INSTALL_PREFIX
CMAKE_OSX_DEPLOYMENT_TARGET
COMMIT_MESSAGE
CXX
DESTDIR
dir
DBE_TAG
DIRECT3D_DLL_REDIST_SEARCH_PATHS
DIRECTX_INC_SEARCH_PATHS
DIRECTX_LIB_SEARCH_PATHS
@ -42,67 +25,28 @@ EMSCRIPTEN_ROOT_PATH
EMSCRIPTEN_SHARE_DATA
EMSCRIPTEN_SYSROOT
EMSCRIPTEN_TOTAL_MEMORY
excluded_sample
format
GH_TOKEN
GIT_EMAIL
GIT_NAME
HOT
included_sample
FETCH_DEPTH
GENERATOR
GRAPHICS_API
HOST
IOS
IPHONEOS_DEPLOYMENT_TARGET
LINUX
LLVM_CLANG_ROOT
MAKEFILE
master
mcpu
mfpu
LIB_TYPE
MINGW
MINGW_PREFIX
MINGW_SYSROOT
MINGW_URL
OPENSSL_ROOT_DIR
ORG_GRADLE_PROJECT_ANDROID_ABI
ORG_GRADLE_PROJECT_URHO3D_LIB_TYPE
ORG_GRADLE_PROJECT_URHO3D_LUAJIT
ORG_GRADLE_PROJECT_URHO3D_SAMPLES
OS
OSX
PACKAGE_UPLOAD
PLATFORM
project
rebased_branch
rebased_branch_suffix
redundant
RELEASE_TAG
remote
RPI
RPI_ABI
RPI_PREFIX
RPI_SYSROOT
SAMPLE_UPLOAD
sdk
SF_DEFAULT
SF_KEY
SITE_UPDATE
split_branch
subdir
sw
TAG
target
TRAVIS
TRAVIS_BRANCH
TRAVIS_COMMIT
TRAVIS_JOB_NUMBER
TRAVIS_PULL_REQUEST
TRAVIS_REPO_SLUG
ts
TARGET
TVOS
upstream
URHO3D_3DNOW
URHO3D_64BIT
URHO3D_ANGELSCRIPT
URHO3D_BINDINGS
URHO3D_D3D11
URHO3D_DATABASE_ODBC
URHO3D_DATABASE_SQLITE
@ -140,6 +84,7 @@ URHO3D_SSE
URHO3D_SSL
URHO3D_SSL_DYNAMIC
URHO3D_STATIC_RUNTIME
URHO3D_STYLE
URHO3D_TESTING
URHO3D_TEST_TIMEOUT
URHO3D_THREADING
@ -150,7 +95,5 @@ URHO3D_USE_LIB64_RPM
URHO3D_USE_LIB_DEB
URHO3D_WEBP
URHO3D_WIN32_CONSOLE
url
USE_CCACHE
WEB
XCODE