Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix project, fix release type #96

Merged
merged 2 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/actions/build-refs/action/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,15 @@ const BUILD_TYPE_TEST_SPECS: Array<[string, [Ref], BuildType]> = [
'develop',
],
[
'when monorepo ref is a release tag is release',
'when monorepo ref is an internal-release tag is release',
['refs/tags/[email protected]'],
'release',
],
[
'when monorepo ref is a release tag is release',
['refs/tags/v12.12.9-alpha.12'],
'release',
],
]

BUILD_TYPE_TEST_SPECS.forEach(
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build-refs/action/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ async function resolveRefs(toAttempt: AttemptableRefs): Promise<OutputRefs> {
}

export function resolveBuildType(ref: Ref): BuildType {
return ref.includes('refs/tags/ot3') ? 'release' : 'develop'
return ref.includes('refs/tags') ? 'release' : 'develop'
}

async function run() {
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build-refs/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9885,7 +9885,7 @@ function resolveRefs(toAttempt) {
});
}
function resolveBuildType(ref) {
return ref.includes('refs/tags/ot3') ? 'release' : 'develop';
return ref.includes('refs/tags') ? 'release' : 'develop';
}
function run() {
return __awaiter(this, void 0, void 0, function* () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_ot_package_version(d):
try:
sys.path.append(os.path.join(s, 'scripts'))
from python_build_utils import get_version
return get_version(d.getVar('OT_PACKAGE', 'robot-server'), 'ot3')
return get_version(d.getVar('OT_PACKAGE', 'robot-server'), d.getVar('OPENTRONS_PROJECT', 'ot3'))
finally:
sys.path = sys.path[:-1]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ do_install_append () {

# create json file to be used in VERSION.json
install -d ${D}/opentrons_versions
python3 ${S}/scripts/python_build_utils.py robot-server ot3 dump_br_version > ${D}/opentrons_versions/opentrons-robot-server-version.json
python3 ${S}/scripts/python_build_utils.py api ot3 dump_br_version > ${D}/opentrons_versions/opentrons-api-version.json
python3 ${S}/scripts/python_build_utils.py robot-server ${OPENTRONS_PROJECT} dump_br_version > ${D}/opentrons_versions/opentrons-robot-server-version.json
python3 ${S}/scripts/python_build_utils.py api ${OPENTRONS_PROJECT} dump_br_version > ${D}/opentrons_versions/opentrons-api-version.json

install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/opentrons-robot-server.service ${D}${systemd_system_unitdir}/opentrons-robot-server.service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ addtask do_write_systemd_dropfile after do_compile before do_install
do_install_append () {
# create json file to be used in VERSION.json
install -d ${D}/opentrons_versions
python3 ${S}/scripts/python_build_utils.py system-server ot3 dump_br_version > ${D}/opentrons_versions/opentrons-system-server-version.json
python3 ${S}/scripts/python_build_utils.py system-server ${OPENTRONS_PROJECT} dump_br_version > ${D}/opentrons_versions/opentrons-system-server-version.json

install -d ${D}/${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/opentrons-system-server.service ${D}/${systemd_system_unitdir}/opentrons-system-server.service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PIPENV_APP_BUNDLE_EXTRA_PIP_ENVARGS = "OPENTRONS_PROJECT=${OPENTRONS_PROJECT}"
do_install_append() {
# create json file to be used in VERSION.json
install -d ${D}/opentrons_versions
python3 ${S}/scripts/python_build_utils.py update-server ot3 dump_br_version > ${D}/opentrons_versions/opentrons-update-server-version.json
python3 ${S}/scripts/python_build_utils.py update-server ${OPENTRONS_PROJECT} dump_br_version > ${D}/opentrons_versions/opentrons-update-server-version.json

install -d ${D}/${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/opentrons-update-server.service ${D}/${systemd_unitdir}/system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ PIPENV_APP_BUNDLE_EXTRA_PIP_ENVARGS = "OPENTRONS_PROJECT=${OPENTRONS_PROJECT}"
do_install_append() {
# create json file to be used in VERSION.json
install -d ${D}/opentrons_versions
python3 ${S}/scripts/python_build_utils.py usb-bridge ot3 dump_br_version > ${D}/opentrons_versions/opentrons-usb-bridge-version.json
python3 ${S}/scripts/python_build_utils.py usb-bridge ${OPENTRONS_PROJECT} dump_br_version > ${D}/opentrons_versions/opentrons-usb-bridge-version.json

install -d ${D}/${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/opentrons-usb-bridge.service ${D}/${systemd_system_unitdir}/opentrons-usb-bridge.service
Expand Down
Loading