File tree Expand file tree Collapse file tree 6 files changed +97
-52
lines changed Expand file tree Collapse file tree 6 files changed +97
-52
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 8
8
9
9
BASE := $(ROOT ) /crystal
10
10
11
- VERSION := $(shell grep 'VERSION =' src/yamlscript/version.cr | cut -d'"' -f2)
12
- YAMLSCRIPT_VERSION ?= 0.1.95
13
11
LIBYS_SO_PATH := $(ROOT ) /libyamlscript/lib/$(LIBYS_SO_FQNP )
14
12
BUILD_DEPS := $(LIBYS_SO_PATH )
15
13
@@ -20,10 +18,10 @@ build:: build-doc
20
18
build-doc :: ReadMe.md
21
19
22
20
ifdef CRYSTAL
23
- test :: run -example test-crystal test-ffi
21
+ test :: test -example test-crystal test-ffi
24
22
endif
25
23
26
- run -example : $(BUILD_DEPS )
24
+ test -example : $(BUILD_DEPS )
27
25
$(CRYSTAL ) run examples/simple.cr
28
26
29
27
test-crystal : $(BUILD_DEPS )
@@ -32,10 +30,11 @@ test-crystal: $(BUILD_DEPS)
32
30
test-ffi : $(BUILD_DEPS )
33
31
$(CRYSTAL ) run test/ffi.cr
34
32
33
+ release :
34
+ $(ROOT ) /util/release-crystal
35
+
35
36
clean ::
36
37
$(RM ) -r lib bin .crystal .shards shard.lock libyamlscript.so
37
38
38
39
$(LIBYS_SO_PATH ) :
39
40
$(MAKE ) -C $(ROOT ) /libyamlscript $(LIBYS_SO_FQNP )
40
-
41
- .PHONY : test
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ lang=crystal
4
+
5
+ source " ${YAMLSCRIPT_ROOT?} /util/release-repo.bash"
6
+
7
+ update () (
8
+ (
9
+ cd " $repo_dir " || exit
10
+ rm -fr \
11
+ examples \
12
+ spec \
13
+ src \
14
+ test
15
+ )
16
+
17
+ cp " $root /License" " $repo_dir /LICENSE"
18
+
19
+ (
20
+ cd " $from_dir " || exit
21
+ cp ReadMe.md \
22
+ shard.yml \
23
+ " $repo_dir /"
24
+ cp -r \
25
+ examples \
26
+ spec \
27
+ src \
28
+ test \
29
+ " $repo_dir /"
30
+ )
31
+ )
32
+
33
+ main " $@ "
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- set -euo pipefail
3
+ lang=go
4
4
5
- set -x
5
+ source " ${YAMLSCRIPT_ROOT?} /util/release-repo.bash "
6
6
7
- cd " $YAMLSCRIPT_ROOT "
7
+ update () (
8
+ cp " $root /License" " $repo_dir /LICENSE"
8
9
9
- ys_go_root=.git/tmp/yamlscript-go
10
- [email protected] :yaml/yamlscript-go
10
+ (
11
+ cd " $from_dir " || exit
12
+ cp \
13
+ ReadMe.md \
14
+ go.mod \
15
+ go.sum \
16
+ yamlscript.go \
17
+ " $repo_dir "
18
+ )
11
19
12
- rm -fr $ys_go_root
13
- git clone $ys_go_url $ys_go_root
14
-
15
- cp \
16
- go/ReadMe.md \
17
- go/go.mod \
18
- go/go.sum \
19
- go/yamlscript.go \
20
- $ys_go_root
21
-
22
- perl -pi -e ' s{yamlscript/go}{yamlscript-go}' \
23
- $ys_go_root /go.mod
24
-
25
- (
26
- cd $ys_go_root || exit
27
- git commit -a -m " Release $YS_RELEASE_VERSION_NEW "
28
- git push
29
- git tag " v$YS_RELEASE_VERSION_NEW "
30
- git push --tags
20
+ perl -pi -e ' s{yamlscript/go}{yamlscript-go}' \
21
+ " $repo_dir /go.mod"
31
22
)
23
+
24
+ main " $@ "
Original file line number Diff line number Diff line change
1
+ # shellcheck disable=2034,2154
2
+
3
+ set -euo pipefail
4
+
5
+ set -x
6
+
7
+ root=$YAMLSCRIPT_ROOT
8
+ version=$YS_RELEASE_VERSION_NEW
9
+
10
+ main () (
11
+ init
12
+ clone
13
+ update
14
+ release
15
+ )
16
+
17
+ init () {
18
+ repo_dir=$root /.git/tmp/yamlscript-$lang
19
+ [email protected] :yaml/yamlscript-
$lang
20
+ from_dir=$root /$lang
21
+ }
22
+
23
+ [email protected] :yaml/yamlscript-
$lang
24
+ from_dir=$root /$lang
25
+
26
+ clone () (
27
+ rm -fr " $repo_dir "
28
+ git clone " $repo_url " " $repo_dir "
29
+ )
30
+
31
+ release () (
32
+ cd " $repo_dir " || exit
33
+ git add -A .
34
+ git commit -m " Release $YS_RELEASE_VERSION_NEW "
35
+ # git push
36
+ git tag " v$YS_RELEASE_VERSION_NEW "
37
+ # git push --tags
38
+ )
39
+
40
+ true
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ steps =: 11
19
19
bindings =::
20
20
- java
21
21
- clojure
22
+ - crystal
22
23
- go
23
24
- julia
24
25
- nodejs
@@ -237,7 +238,7 @@ defn step-10(ctx):
237
238
try:
238
239
run: "make -C $dir release"
239
240
catch Exception e:
240
- if ( dir == ' clojure') || (dir == ' java' ):
241
+ if dir.in?(qw( clojure java) ):
241
242
warn: "Failed to release $dir. Continuing."
242
243
die: "Failed to release $dir. Exiting."
243
244
You can’t perform that action at this time.
0 commit comments