Skip to content

Commit

Permalink
updated local scripts for creating release artifacts and updated GitH…
Browse files Browse the repository at this point in the history
…ub workflows (CONNECTORS-1754)
  • Loading branch information
OpenPj committed Sep 18, 2024
1 parent 7fff2f6 commit 4b3ca63
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/create-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
type: choice
description: Select the ManifoldCF release
options:
- 2.27-JDK-11
- 2.26-JDK-11 #Java 11
- 2.25-JDK-8
- 2.24-JDK-8
Expand Down Expand Up @@ -57,6 +58,7 @@ on:
jobs:
createDockerImageBuildingFromSourceCode:
if: |
(github.event.inputs.release != '2.27-JDK-11') &&
(github.event.inputs.release != '2.26-JDK-11') &&
(github.event.inputs.release != '2.25-JDK-8') &&
(github.event.inputs.release != '2.24-JDK-8') &&
Expand Down Expand Up @@ -84,7 +86,7 @@ jobs:
ref: release-${{ steps.mcf.outputs.release }}

- name: Set up OpenJDK ${{ steps.jdk.outputs.version }} Temurin x64
uses: actions/setup-java@v4.2.2
uses: actions/setup-java@v4.3.0
with:
java-version: '${{ steps.jdk.outputs.version }}'
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/[email protected]

- name: Set up OpenJDK 11 Temurin x64
uses: actions/setup-java@v4.2.2
uses: actions/setup-java@v4.3.0
with:
java-version: '11'
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/[email protected]

- name: Set up OpenJDK 11 Temurin x64
uses: actions/setup-java@v4.2.2
uses: actions/setup-java@v4.3.0
with:
java-version: '11'
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
ref: ${{ github.event.inputs.release }}

- name: Set up Java
uses: actions/setup-java@v4.2.2
uses: actions/setup-java@v4.3.0
with:
java-version: '11'
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-maven-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: actions/[email protected]

- name: Set up Java
uses: actions/setup-java@v4.2.2
uses: actions/setup-java@v4.3.0
with:
java-version: '11'
distribution: 'temurin'
Expand Down
28 changes: 28 additions & 0 deletions create-release-candidate-only-artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

#Get Maven POM version
export mcfVersion=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)

#Built Branch Version
export currentMavenVersion="$mcfVersion"
export suffixToRemove="SNAPSHOT"
export branchVersion=${currentMavenVersion%$suffixToRemove}

#Update all the Maven modules with the new version
mvn versions:set -DnewVersion=$mcfVersion -DremoveSnapshot -DgenerateBackupPoms=false

#Update Ant script with the new RC version
sed -i -e 's/"$mcfVersion"-dev/"$mcfVersion"/g' build.xml;

#Update CHANGES.txt
sed -i -e 's/"$mcfVersion"-dev/Release "$mcfVersion"/g' CHANGES.txt;

#Ant Build
ant make-core-deps make-deps image

#Artifact version
export artifactVersion=$branchVersion"dev"

#Rename KEYS and CHANGES.txt artifacts
cp KEYS apache-manifoldcf-$artifactVersion.KEYS
cp CHANGES.txt apache-manifoldcf-$artifactVersion.CHANGES.txt
26 changes: 13 additions & 13 deletions create-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ releasecandidatetag=$1
export mcfVersion=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)

#Built Branch Version
currentMavenVersion="$mcfVersion"
suffixToRemove="SNAPSHOT"
branchVersion=${currentMavenVersion%"$suffixToRemove"}
export currentMavenVersion="$mcfVersion"
export suffixToRemove="SNAPSHOT"
export branchVersion=${currentMavenVersion%$suffixToRemove}
branchTag=$branchVersion$releasecandidatetag

#Create new release candidate branch
git branch release-$branchTag
git push --set-upstream origin release-branchTag
git checkout release-branchTag
git push --set-upstream origin release-$branchTag
git checkout release-$branchTag

#Update all the Maven modules with the new version
mvn versions:set -DnewVersion=mcfVersion -DremoveSnapshot -DgenerateBackupPoms=false
mvn versions:set -DnewVersion=$mcfVersion -DremoveSnapshot -DgenerateBackupPoms=false

#Update Ant script with the new RC version
sed -i 's/$mcfVersion-dev/$mcfVersion/g' build.xml;
sed -i -e 's/"$mcfVersion"-dev/"$mcfVersion"/g' build.xml;

#Update CHANGES.txt
sed -i 's/$mcfVersion-dev/Release $mcfVersion/g' CHANGES.txt;
sed -i -e 's/"$mcfVersion"-dev/Release "$mcfVersion"/g' CHANGES.txt;

#Ant Build
ant make-core-deps make-deps image
Expand All @@ -31,10 +31,10 @@ ant make-core-deps make-deps image
mvn clean install -B -DskipTests -DskipITs

#Update MCF version in the properties.xml files
sed -i 's/$mcfVersion-dev/$mcfVersion/g' dist/example/properties.xml;
sed -i 's/$mcfVersion-dev/$mcfVersion/g' dist/example-proprietary/properties.xml;
sed -i 's/$mcfVersion-dev/$mcfVersion/g' dist/multiprocess-file-example/properties.xml;
sed -i 's/$mcfVersion-dev/$mcfVersion/g' dist/multiprocess-file-example-proprietary/properties.xml;
sed -i -e 's/"$mcfVersion"-dev/"$mcfVersion"/g' dist/example/properties.xml;
sed -i -e 's/"$mcfVersion"-dev/"$mcfVersion"/g' dist/example-proprietary/properties.xml;
sed -i -e 's/"$mcfVersion"-dev/"$mcfVersion"/g' dist/multiprocess-file-example/properties.xml;
sed -i -e 's/"$mcfVersion"-dev/"$mcfVersion"/g' dist/multiprocess-file-example-proprietary/properties.xml;

#RAT licence checks
mvn -pl . apache-rat:check
Expand All @@ -50,7 +50,7 @@ git commit -am "Create $releasecandidatetag tag for MCF $mcfVersion"
git push

#Artifact version
export artifactVersion=$branchVersiondev
export artifactVersion=$branchVersion"dev"

#Rename KEYS and CHANGES.txt artifacts
cp KEYS apache-manifoldcf-$artifactVersion.KEYS
Expand Down

0 comments on commit 4b3ca63

Please sign in to comment.