8000 Simplify SNAPSHOTS.md instructions · scijava/pom-scijava@b5ac60e · GitHub
[go: up one dir, main page]

Skip to content

Commit b5ac60e

Browse files
committed
Simplify SNAPSHOTS.md instructions
We could just delete the file, but leaving a hint is nice.
1 parent 4f8848e commit b5ac60e

File tree

1 file changed

+2
-50
lines changed

1 file changed

+2
-50
lines changed

SNAPSHOTS.md

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,4 @@
11
So, you want to run the mega-melt, but with some SNAPSHOTs built from branches?
22

3-
Here is an example script that does so for the labkit-pixel-classification and
4-
labkit-ui components. Copy this script into a file called `go`, change the
5-
`adjust`... lines below to match the branches of your SNAPSHOT component(s),
6-
and then give it a try with `sh go`!
7-
8-
```shell
9-
#!/bin/sh
10-
11-
# Fail on error.
12-
set -e
13-
14-
# Generate the mega melt structure.
15-
tests/run.sh -s
16-
17-
# Pull appropriate branches, build artifacts, and install them locally.
18-
adjust() {
19-
dir=$1
20-
remote=$2
21-
branch=$3
22-
cd "target/mega-melt/melting-pot/$dir"
23-
24-
# fetch the needed branch
25-
git remote add upstream "$remote"
26-
git fetch upstream
27-
28-
# discard pom.xml hacks
29-
git checkout pom.xml
30-
31-
# switch to the needed branch
32-
git checkout "upstream/$branch"
33-
34-
# reapply pom.xml hacks
35-
mv pom.xml pom.xml.original &&
36-
sed -E -e 's_(https?://maven.imagej.net|http://maven.scijava.org)_https://maven.scijava.org_g' \
37-
-e 's_http://maven.apache.org/xsd_https://maven.apache.org/xsd_g' pom.xml.original > pom.xml ||
38-
die "Failed to adjust pom.xml"
39-
perl -0777 -i -pe 's/(<parent>\s*<groupId>org.scijava<\/groupId>\s*<artifactId>pom-scijava<\/artifactId>\s*<version>)[^\n]*/${1}999-mega-melt<\/version>/igs' pom.xml
40-
41-
# build and install the component
42-
mvn -Denforcer.skip -DskipTests -Dmaven.test.skip -Dinvoker.skip clean install
43-
44-
cd - >/dev/null
45-
}
46-
adjust sc.fiji/labkit-pixel-classification https://github.com/ctrueden/labkit-pixel-classification bump-to-imglib2-6.1.0
47-
adjust sc.fiji/labkit-ui https://github.com/ctrueden/labkit-ui bump-to-imglib2-6.1.0
48-
49-
# Run the mega melt!
50-
cd target/mega-melt/melting-pot
51-
./melt.sh 2>&1 | tee melt.log
52-
```
3+
Change the `components=` section of `tests/run.sh script` to include
4+
your changed components, as documented in the comment block there!

0 commit comments

Comments
 (0)
0