-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from mcorino/develop
Develop
- Loading branch information
Showing
3 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
require 'uri' | ||
require 'net/https' | ||
require 'json' | ||
|
||
$GITHUB_TOKEN = ENV['GITHUB_TOKEN'] || '' | ||
if $GITHUB_TOKEN.empty? | ||
$stdout.puts 'ERROR: GitHub access token missing!' | ||
exit(1) | ||
end | ||
|
||
uri = URI('https://api.github.com/repos/mcorino/wxruby3/releases/latest') | ||
headers = { | ||
'Accept' => 'application/vnd.github+json', | ||
'X-GitHub-Api-Version' => '2022-11-28', | ||
'Authorization' => "Bearer #{ENV['GITHUB_TOKEN']}" | ||
} | ||
rest_response = Net::HTTP.get_response(uri, headers) | ||
if rest_response.code.to_i == 200 | ||
data = JSON.parse!(rest_response.body) | ||
$stdout.puts data['tag_name'] | ||
else | ||
$stdout.puts "ERROR: Cannot determine latest release [#{rest_response}]!" | ||
exit(1) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ "$CIRRUS_BUILD_SOURCE" == "api" ]; then | ||
bundle install | ||
bundle exec rake gem | ||
if [ "$distro" == "macosx" ]; then | ||
gem install $(echo pkg/*.gem) --no-format-executable && wxruby test --exclude=test_intl --exclude=test_media_ctrl | ||
else | ||
gem install $(echo pkg/*.gem) --no-format-executable && xvfb-run -a -s '-screen 0 1600x1200x24' wxruby test --exclude=test_intl --exclude=test_media_ctrl | ||
if [ "$CIRRUS_TAG" == "" ]; then | ||
CIRRUS_TAG=$(ruby tools/scripts/cirrus/get_release_tag.rb) | ||
rc=$? | ||
if [ "$rc" != "0" ]; then | ||
echo "$CIRRUS_TAG" | ||
exit $rc | ||
fi | ||
fi | ||
|
||
WXRUBY_VERSION=${CIRRUS_TAG/#v/} | ||
if grep -q "\-[a-zA-Z]" <<< "$CIRRUS_TAG" ; then | ||
WXRUBY_PRERELEASE="--pre" | ||
else | ||
WXRUBY_VERSION=${CIRRUS_TAG/#v/} | ||
if grep -q "\-[a-zA-Z]" <<< "$CIRRUS_TAG" ; then | ||
WXRUBY_PRERELEASE="--pre" | ||
else | ||
WXRUBY_PRERELEASE="" | ||
fi | ||
if [ "$distro" == "macosx" ]; then | ||
gem install wxruby3 -v "$WXRUBY_VERSION" ${WXRUBY_PRERELEASE} --no-format-executable && wxruby test --exclude=test_intl --exclude=test_media_ctrl | ||
else | ||
gem install wxruby3 -v "$WXRUBY_VERSION" ${WXRUBY_PRERELEASE} --no-format-executable && xvfb-run -a -s '-screen 0 1600x1200x24' wxruby test --exclude=test_intl --exclude=test_media_ctrl | ||
fi | ||
WXRUBY_PRERELEASE="" | ||
fi | ||
if [ "$distro" == "macosx" ]; then | ||
gem install wxruby3 -v "$WXRUBY_VERSION" ${WXRUBY_PRERELEASE} --no-format-executable && wxruby test --exclude=test_intl --exclude=test_media_ctrl | ||
else | ||
gem install wxruby3 -v "$WXRUBY_VERSION" ${WXRUBY_PRERELEASE} --no-format-executable && xvfb-run -a -s '-screen 0 1600x1200x24' wxruby test --exclude=test_intl --exclude=test_media_ctrl | ||
fi |