mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 05:53:12 -07:00
Generate chiaki.rb Cask on Travis (#37)
This commit is contained in:
parent
6a829d5dfd
commit
326ffdaa8f
4 changed files with 31 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -16,3 +16,4 @@ appdir
|
||||||
/openssl*
|
/openssl*
|
||||||
.vs
|
.vs
|
||||||
CMakeSettings.json
|
CMakeSettings.json
|
||||||
|
chiaki.rb
|
||||||
|
|
|
@ -89,6 +89,10 @@ matrix:
|
||||||
- /usr/local/opt/qt/bin/macdeployqt Chiaki.app -dmg
|
- /usr/local/opt/qt/bin/macdeployqt Chiaki.app -dmg
|
||||||
- export DEPLOY_FILE="Chiaki-macOS-${CHIAKI_VERSION}-x86_64.dmg"
|
- export DEPLOY_FILE="Chiaki-macOS-${CHIAKI_VERSION}-x86_64.dmg"
|
||||||
- mv Chiaki.dmg "$DEPLOY_FILE"
|
- mv Chiaki.dmg "$DEPLOY_FILE"
|
||||||
|
- cmake -DCHIAKI_VERSION="${CHIAKI_VERSION}" -DCHIAKI_DMG="${DEPLOY_FILE}" -DCHIAKI_DMG_FILENAME="${DEPLOY_FILE}" -DCHIAKI_CASK_OUT=chiaki.rb -P scripts/configure-cask.cmake
|
||||||
|
- echo "------------------- chiaki.rb cask -------------------"
|
||||||
|
- cat chiaki.rb
|
||||||
|
- echo "------------------------------------------------------"
|
||||||
|
|
||||||
- name: Android
|
- name: Android
|
||||||
language: android
|
language: android
|
||||||
|
|
15
scripts/chiaki.rb.in
Normal file
15
scripts/chiaki.rb.in
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
cask 'chiaki' do
|
||||||
|
version '@CHIAKI_VERSION@'
|
||||||
|
sha256 '@CHIAKI_DMG_SHA256@'
|
||||||
|
|
||||||
|
url "https://github.com/thestr4ng3r/chiaki/releases/download/v@CHIAKI_VERSION@/@CHIAKI_DMG_FILENAME@"
|
||||||
|
name 'Chiaki'
|
||||||
|
homepage 'https://github.com/thestr4ng3r/chiaki'
|
||||||
|
|
||||||
|
app "Chiaki.app"
|
||||||
|
|
||||||
|
zap trash: [
|
||||||
|
'~/Library/Application Support/Chiaki',
|
||||||
|
'~/Library/Preferences/com.chiaki.Chiaki.plist'
|
||||||
|
]
|
||||||
|
end
|
11
scripts/configure-cask.cmake
Normal file
11
scripts/configure-cask.cmake
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
|
||||||
|
if(NOT CHIAKI_VERSION OR NOT CHIAKI_DMG OR NOT CHIAKI_DMG_FILENAME OR NOT CHIAKI_CASK_OUT)
|
||||||
|
message(FATAL_ERROR "CHIAKI_VERSION, CHIAKI_DMG, CHIAKI_DMG_FILENAME and CHIAKI_CASK_OUT must be set.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CHIAKI_VERSION MATCHES "^v([0-9].*)$")
|
||||||
|
set(CHIAKI_VERSION "${CMAKE_MATCH_1}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(SHA256 "${CHIAKI_DMG}" CHIAKI_DMG_SHA256)
|
||||||
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/chiaki.rb.in" "${CHIAKI_CASK_OUT}")
|
Loading…
Add table
Add a link
Reference in a new issue