Skip to content

Commit d16b951

Browse files
committed
Ship go src code tests, and run the semver test
1 parent a8987cb commit d16b951

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

go-1.24.yaml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,36 @@ pipeline:
6868
rm -rf "${{targets.destdir}}"/usr/lib/go/pkg/tool/*/go_bootstrap
6969
rm -rf "${{targets.destdir}}"/usr/lib/go/src/cmd/dist/dist
7070
71-
# Remove tests from /usr/lib/go/src, not needed at runtime
72-
find "${{targets.destdir}}"/usr/lib/go/src \( -type f -a -name "*_test.go" \) \
73-
-exec rm -rf \{\} \+
74-
find "${{targets.destdir}}"/usr/lib/go/src \( -type d -a -name "testdata" \) \
75-
-exec rm -rf \{\} \+
76-
find "${{targets.destdir}}"/usr/lib/go/src \( -type f -a -name "*.rc" \) \
77-
-exec rm -rf \{\} \+
78-
find "${{targets.destdir}}"/usr/lib/go/src \( -type f -a -name "*.bat" \) \
79-
-exec rm -rf \{\} \+
80-
find "${{targets.destdir}}"/usr/lib/go/src \( -type f -a -name "*.pem" \) \
81-
-exec rm -rf \{\} \+
82-
8371
- uses: strip
8472

8573
subpackages:
74+
- name: "${{package.name}}-src"
75+
description: "go source code and tests"
76+
dependencies:
77+
runtime:
78+
- ${{package.name}}=${{package.full-version}}
79+
pipeline:
80+
- runs: |
81+
cd ${{targets.destdir}}/
82+
mkdir -p ${{targets.subpkgdir}}
83+
find . -name '*_test.go' -exec cp -v --parents -r '{}' ${{targets.subpkgdir}} \;
84+
find . -name 'testdata' -exec cp -v --parents -r '{}' ${{targets.subpkgdir}} \;
85+
find . -name '*.rc' -exec cp -v --parents -r '{}' ${{targets.subpkgdir}} \;
86+
find . -name '*.bat' -exec cp -v --parents -r '{}' ${{targets.subpkgdir}} \;
87+
find . -name '*.pem' -exec cp -v --parents -r '{}' ${{targets.subpkgdir}} \;
88+
89+
find . -name '*_test.go' -exec rm -f '{}' \;
90+
find . -name 'testdata' -exec rm -f '{}' \;
91+
find . -name '*.rc' -exec rm -f '{}' \;
92+
find . -name '*.bat' -exec rm -f '{}' \;
93+
find . -name '*.pem' -exec rm -f '{}' \;
94+
95+
test:
96+
pipeline:
97+
- name: Test Semver fix
98+
runs: |
99+
go test -a -v cmd/go -run=Script/build_version_stamping_git
100+
86101
- name: "${{package.name}}-doc"
87102
description: "go documentation"
88103
pipeline:

0 commit comments

Comments
 (0)