Skip to content

Commit

Permalink
attempt to use new version of pl-package-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
DenKoren committed Aug 21, 2024
1 parent 0a2bbbf commit d7108bb
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:

publish-script-name: 'release'

env: >-
{
"PL_REGISTRY_MILABORATORIES_UPLOAD_URL": "s3://milab-euce1-prod-pkgs-s3-platforma-registry/pub/?region=eu-central-1"
}
aws-publish-enable: true
aws-iam-role-to-assume: 'arn:aws:iam::511903394050:role/milab-euce1-prod-github-oidc-role-pl-registry'

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 50 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,64 @@
"description": "Small cross-platform binaries, like 'sleep' or 'hello-world', suitable for test needs",
"scripts": {
"build": "true",

"pkg:build": "./scripts/build.sh",

"release:packages": "./scripts/publish.sh",
"release:descriptors": "pl-pkg publish descriptor",
"release:descriptors": "pl-pkg publish descriptors",
"release": "npm run pkg:build && npm run release:packages && npm run release:descriptors"
},
"block-software": {
"packages": {
"hello-world": {
"binary": {
"registry": { "name": "milaboratories" },
"name": "common/hello-world",
"version": "1.6.2",
"root": "./nonexistent/",
"entrypoints": {
"hello-world": { "cmd": [ "{pkg}/main" ] }
}
}
},
"sleep": {
"binary": {
"registry": { "name": "milaboratories" },
"name": "common/sleep",
"version": "1.6.2",
"root": "./nonexistent/",
"entrypoints": {
"sleep": { "cmd": [ "{pkg}/main" ] }
}
}
},
"guided-command": {
"binary": {
"registry": { "name": "milaboratories" },
"name": "common/guided-command",
"version": "1.6.2",
"root": "./nonexistent/",
"entrypoints": {
"guided-command": { "cmd": [ "{pkg}/main" ] }
}
}
},
"read-file-to-stdout-with-sleep": {
"binary": {
"registry": { "name": "milaboratories" },
"name": "common/read-file-to-stdout-with-sleep",
"version": "1.6.2",
"root": "./nonexistent/",
"entrypoints": {
"read-file-to-stdout-with-sleep": { "cmd": [ "{pkg}/main" ] }
}
}
}
}
},
"files": [
"dist/"
],
"license": "UNLICENSED",
"devDependencies": {
"@milaboratory/pl-package-builder": "^1.8.2"
"@milaboratory/pl-package-builder": "^2.4.0"
}
}
13 changes: 6 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ build_binary() {
"./${_bin_name}.go"
printf "\n"

pl-pkg build package \
--package-name="common/${_bin_name}" \
pl-pkg build packages \
--package-id="${_bin_name}" \
--os="${_os_reg}" \
--arch="${_arch_reg}" \
--content-root="${BUILD_DIR}/${_group}/${_bin_name}/"
Expand All @@ -55,9 +55,8 @@ build_binaries() {
build_binary "${_bin_name}" "darwin" "amd64" "macosx" "x64"
build_binary "${_bin_name}" "darwin" "arm64" "macosx" "aarch64"

pl-pkg build descriptor \
--name="${_bin_name}" \
--package-name="common/${_bin_name}"
pl-pkg build descriptors \
--package-id="${_bin_name}"
}

rm -rf "${script_dir}/${BUILD_DIR}"
Expand All @@ -68,6 +67,6 @@ build_binaries "sleep"
build_binaries "read-file-to-stdout-with-sleep"

echo ""
echo "All binaries are saved to '${script_dir}/${BUILD_DIR}'"
echo "All packages are saved to '${script_dir}/pkg-*.tgz' archives"
echo "All binaries are saved to '$(pwd)/${BUILD_DIR}'"
echo "All packages are saved to '$(pwd)/pkg-*.tgz' archives"
echo ""
3 changes: 2 additions & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ publish_package() {
local _arch="${3}"

pl-pkg publish package \
--package-name="common/${_bin_name}" \
--package-id="${_bin_name}" \
--skip-existing-packages \
--os="${_os}" \
--arch="${_arch}"
printf "\n"
Expand Down

0 comments on commit d7108bb

Please sign in to comment.