Skip to content

Commit ec01449

Browse files
committed
assorted fixes; makes it possible to add arbitrary labels to the version number.
1 parent 04a63db commit ec01449

4 files changed

Lines changed: 7 additions & 11 deletions

File tree

.github/workflows/deploy_to_internal.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: 'Deploy to dataverse-internal.iq.harvard.edu'
33
on:
44
workflow_dispatch:
55
inputs:
6-
branch name:
7-
description: Desired branch
6+
buildlabel:
7+
description: 'Custom label that will appear after the version number (the equivalent of the old "build number" entry).'
88
type: string
9-
required: true
9+
required: false
1010

1111
concurrency:
1212
group: deploy-to-internal
@@ -24,12 +24,8 @@ jobs:
2424
distribution: 'zulu'
2525
java-version: '21'
2626

27-
- name: Enable API Session Auth feature flag
28-
working-directory: src/main/resources/META-INF
29-
run: echo -e "dataverse.feature.api-session-auth=true" >> microprofile-config.properties
30-
3127
- name: Set build number
32-
run: scripts/installer/custom-build-number
28+
run: scripts/installer/custom-build-number ${{ github.event.inputs.buildlabel }}
3329

3430
- name: Build application war
3531
run: mvn package

.github/workflows/generate_war_file.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
java-version: '21'
2222

2323
- name: Set build number
24-
run: scripts/installer/custom-build-number ${{ github.event.inputs.basepath }}
24+
run: scripts/installer/custom-build-number ${{ github.event.inputs.buildlabel }}
2525

2626
- name: Get branch name
2727
id: branch-name

scripts/installer/custom-build-number-hook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
# Git changes workdir to root of repo per git documentation
33
BRANCH_COMMIT=$(git rev-parse --abbrev-ref HEAD)-$(git log --oneline | head -1 | awk '{print $1}')
4-
echo "build.number=$BRANCH_COMMIT" > src/main/java/BuildNumber.properties
4+
echo "build.number=build $BRANCH_COMMIT" > src/main/java/BuildNumber.properties
55

66
# Based on https://stackoverflow.com/questions/25590267
77
# $6 = previous branch, $8 is next branch

src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public String getVersion(boolean withBuildNumber) {
125125
}
126126

127127
if (!buildNumber.equals("")) {
128-
return appVersion + " build " + buildNumber;
128+
return appVersion + " " + buildNumber;
129129
}
130130
}
131131

0 commit comments

Comments
 (0)