Skip to content

Commit c860756

Browse files
author
webdev778
committed
Update CI for unsubmodule patch
1 parent 4340ce1 commit c860756

File tree

4 files changed

+23
-30
lines changed

4 files changed

+23
-30
lines changed

.github/workflows/assets.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ jobs:
1212
BUNDLE_WITHOUT: "secryst:jsexec"
1313
SKIP_JS: "1"
1414
steps:
15-
- name: Checkout repository and submodules
15+
- name: Checkout repository
1616
uses: actions/checkout@v2
1717
with:
18-
submodules: true
18+
repository: interscript/interscript-bootstrap
19+
- name: Run a bootstrap script
20+
run: ruby bootstrap.rb
1921
- name: Use Ruby
2022
uses: ruby/setup-ruby@v1
2123
with:

.github/workflows/rake.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
tags: [ v* ]
77
pull_request:
88

9-
defaults:
10-
run:
11-
working-directory: ./ruby
12-
139
jobs:
1410
rspec:
1511
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
@@ -37,10 +33,13 @@ jobs:
3733
SKIP_JS: "1"
3834

3935
steps:
40-
- name: Checkout repository and submodules
36+
- name: Checkout repository
4137
uses: actions/checkout@v2
4238
with:
43-
submodules: true
39+
repository: interscript/interscript-bootstrap
40+
41+
- name: Run a bootstrap script
42+
run: ruby bootstrap.rb
4443

4544
- name: Use Ruby
4645
uses: ruby/setup-ruby@v1
@@ -51,5 +50,7 @@ jobs:
5150

5251
- name: Run RSpecs
5352
run: |
53+
pushd ruby
5454
bundle install --with=jsexec
5555
bundle exec rspec -f f
56+
popd

.github/workflows/release.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ jobs:
99
release:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
1314
with:
14-
submodules: true
15+
repository: interscript/interscript-bootstrap
16+
17+
- name: Run a bootstrap script
18+
run: ruby bootstrap.rb
1519

1620
- uses: actions/setup-ruby@v1
1721
with:
1822
ruby-version: '2.7'
1923
architecture: 'x64'
24+
working-directory: ./ruby
2025

2126
- uses: actions/setup-node@v1
2227
with:
@@ -43,26 +48,10 @@ jobs:
4348
:rubygems_api_key: ${RUBYGEMS_API_KEY}
4449
EOF
4550
chmod 0600 ~/.gem/credentials
46-
pushd js
47-
git status
48-
popd
49-
pushd maps
50-
git status
51-
gem release
52-
popd
5351
pushd ruby
5452
git status
5553
gem release
5654
popd
57-
- name: Publish to npmjs.org
58-
env:
59-
NPMJS_TOKEN: ${{secrets.INTERSCRIPT_NPM_TOKEN}}
60-
run: |
61-
pushd js
62-
npm config set //registry.npmjs.org/:_authToken=$NPMJS_TOKEN
63-
npm run prepareMaps
64-
npm publish
65-
popd
6655
6756
# Let's keep it commented out for now. Please uncomment it once you are ready with
6857
# interscript-api to support Interscript v2.

Rakefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ task :compile, [:compiler, :target] do |t, args|
3737
File.write(args[:target] + "/index.json", maplist.to_json)
3838
end
3939

40-
task :version, [:ver] do |t, ver|
40+
task :version, [:ver, :part] do |t, ver|
4141
ver = ver[:ver]
42+
part = ver[:part]
4243

4344
rubyver = File.read(rubyfile = __dir__+"/lib/interscript/version.rb")
4445
jsver = File.read(jsfile = __dir__+"/../js/package.json")
@@ -48,9 +49,9 @@ task :version, [:ver] do |t, ver|
4849
jsver = jsver.gsub(/("version": ")([0-9a-z.-]*)(")/, "\\1#{ver}\\3")
4950
mapsver = mapsver.gsub(/(INTERSCRIPT_MAPS_VERSION=")([0-9a-z.-]*)(")/, "\\1#{ver}\\3")
5051

51-
File.write(rubyfile, rubyver)
52-
File.write(jsfile, jsver)
53-
File.write(mapsfile, mapsver)
52+
File.write(rubyfile, rubyver) if %w[all ruby].include? part
53+
File.write(jsfile, jsver) if %w[all js].include? part
54+
File.write(mapsfile, mapsver) %w[all maps].include? part
5455
end
5556

5657
task :generate_visualization_html do

0 commit comments

Comments
 (0)