Skip to content

Commit d8c9a0e

Browse files
authored
Merge pull request #217 from oracle/update-get-script
Update get scripts to pull version from when script was published
2 parents 1fc30eb + 793fdc5 commit d8c9a0e

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

get2.0.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
2-
# Copyright (c) 2021, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44

5-
curl -L -O https://github.com/oracle/weblogic-monitoring-exporter/releases/latest/download/wls-exporter.war
5+
curl -L -O https://github.com/oracle/weblogic-monitoring-exporter/releases/download/v${version}/wls-exporter.war
66

77
if [ ! -z "$1" ]; then
88
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)

get2.1.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
3+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
5+
curl -L -O https://github.com/oracle/weblogic-monitoring-exporter/releases/download/v${version}/wls-exporter.war
6+
7+
if [ ! -z "$1" ]; then
8+
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
9+
echo "created $tmp_dir"
10+
cp $1 $tmp_dir/config.yml
11+
warDir=$PWD
12+
pushd $tmp_dir
13+
echo "in temp dir"
14+
zip $warDir/wls-exporter.war config.yml
15+
popd
16+
# rm -rf $tmp_dir
17+
fi

pom.xml

+22
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,28 @@
166166
<groupId>org.apache.maven.plugins</groupId>
167167
<artifactId>maven-resources-plugin</artifactId>
168168
<version>${maven-resources-plugin-version}</version>
169+
<executions>
170+
<execution>
171+
<id>copy-resources</id>
172+
<phase>validate</phase>
173+
<goals>
174+
<goal>copy-resources</goal>
175+
</goals>
176+
<configuration>
177+
<outputDirectory>${basedir}/target/release-artifacts</outputDirectory>
178+
<resources>
179+
<resource>
180+
<directory>${basedir}</directory>
181+
<includes>
182+
<include>get2.0.sh</include>
183+
<include>get2.1.sh</include>
184+
</includes>
185+
<filtering>true</filtering>
186+
</resource>
187+
</resources>
188+
</configuration>
189+
</execution>
190+
</executions>
169191
</plugin>
170192

171193
<plugin>

0 commit comments

Comments
 (0)