Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
bkona-alopa committed Sep 26, 2024
1 parent f59e060 commit af5dcf8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 22 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,39 @@ jobs:
run: |
echo "$(cat ./test.json | jq '(.| .MOBILE_CONFIG_VALUES | .ISAGE_URLS)')" > ios_build_config_values.json
- name: prop file json to env variables
uses: antifree/[email protected]
- name: Get build properties
id: propsFromBuildConfig
uses: RadovanPelka/github-action-json@main
with:
filename: test.json
path: "ios_build_config_values.json"

- name: test
id: test
run: |
MOBILE_CONFIG_VALUES=$(cat ios_build_config_values.json)
ESCAPED_MOBILE_CONFIG_VALUES=$(echo $MOBILE_CONFIG_VALUES | jq -c '.')
# MOBILE_CONFIG_VALUES=$(cat ios_build_config_values.json)
# ESCAPED_MOBILE_CONFIG_VALUES=$(echo $MOBILE_CONFIG_VALUES | jq -c '.')
echo "************************"
echo "ESCAPED_MOBILE_CONFIG_VALUES : $ESCAPED_MOBILE_CONFIG_VALUES"
echo "************************"
# echo "************************"
# echo "ESCAPED_MOBILE_CONFIG_VALUES : $ESCAPED_MOBILE_CONFIG_VALUES"
# echo "************************"
echo "MOBILE_CONFIG_VALUES=$(echo $MOBILE_CONFIG_VALUES | jq -c '.')" >> "$GITHUB_ENV"
# echo "MOBILE_CONFIG_VALUES=$(echo $MOBILE_CONFIG_VALUES | jq -c '.')" >> "$GITHUB_ENV"
TEST=$(jq '(.| .isage | .scheme)' ./test.json ) >> $GITHUB_ENV
echo "TEST=${{ toJson(env.TEST) }}" >> $GITHUB_OUTPUT
echo "scheme=$${{ toJSON(steps.propsFromBuildConfig.outputs.scheme) }}" >> $GITHUB_OUTPUT
- name: Substitute env variables in network.json file
env:
MOBILE_CONFIG_VALUES: "${{ env.MOBILE_CONFIG_VALUES }}"
uses: danielr1996/[email protected]
with:
input: "./network.json"
output: "./Network-Final.json"
# - name: Substitute env variables in network.json file
# env:
# MOBILE_CONFIG_VALUES: "${{ env.MOBILE_CONFIG_VALUES }}"
# uses: danielr1996/[email protected]
# with:
# input: "./network.json"
# output: "./Network-Final.json"

# - name: testing construction
# run: |
# echo -n "{\"country\":${{ env.MOBILE_CONFIG_VALUES }},\"model_number\":\"${MODELNUMBER}\",\"version_number\":\"${SERVERVERSION}\",\"mfg_date\":\"${MFGDATE}\"} | sed -e 's/^"//' -e 's/"$//" > Network-Final.json

- name: final test
run: |
cat "./Network-Final.json"
echo "test: ${{ steps.test.outputs.TEST }}"
# cat "./Network-Final.json"
echo "test: ${{ steps.test.outputs.scheme }}"
21 changes: 19 additions & 2 deletions test.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"dosecheck": {
"infoPlistName": "Novo-Info",
"mobileConfigName": "DOSECHEK_URLS",
"scheme": ["NovoApp"],
"buildParameters": [
{
"Environments": [
Expand All @@ -20,6 +19,9 @@
"buildTypeList": [
"ENTERPRISE"
],
"scheme": [
"NovoApp"
],
"bundle_short_ver": "3.1.0",
"aws_role_arn": "arn:aws:iam::424114987786:role/mobile-build-uploader-role",
"exportTeamId": {
Expand Down Expand Up @@ -58,6 +60,9 @@
"buildTypeList": [
"ENTERPRISE"
],
"scheme": [
"NovoApp"
],
"bundle_short_ver": "3.1.0",
"aws_role_arn": "arn:aws:iam::424114987786:role/mobile-build-uploader-role",
"exportTeamId": {
Expand Down Expand Up @@ -96,6 +101,9 @@
"buildTypeList": [
"ENTERPRISE"
],
"scheme": [
"NovoApp"
],
"bundle_short_ver": "3.1.0",
"aws_role_arn": "arn:aws:iam::424114987786:role/mobile-build-uploader-role",
"exportTeamId": {
Expand Down Expand Up @@ -134,6 +142,9 @@
"buildTypeList": [
"ENTERPRISE"
],
"scheme": [
"NovoApp"
],
"bundle_short_ver": "3.1.0",
"aws_role_arn": "arn:aws:iam::424114987786:role/mobile-build-uploader-role",
"exportTeamId": {
Expand Down Expand Up @@ -173,6 +184,9 @@
"ENTERPRISE",
"RELEASE"
],
"scheme": [
"NovoApp"
],
"bundle_short_ver": "3.1.0",
"aws_role_arn": "arn:aws:iam::709643934228:role/mobile-build-uploader-role",
"exportTeamId": {
Expand Down Expand Up @@ -216,7 +230,6 @@
"isage": {
"infoPlistName": "Info",
"mobileConfigName": "ISAGE_URLS",
"scheme": ["iSage"],
"buildParameters": [
{
"Environments": [
Expand All @@ -226,6 +239,7 @@
"buildTypeList": [
"ENTERPRISE"
],
"scheme": ["iSage"],
"bundle_short_ver": "3.1.0",
"aws_role_arn": "arn:aws:iam::424114987786:role/mobile-build-uploader-role",
"exportTeamId": {
Expand Down Expand Up @@ -264,6 +278,7 @@
"buildTypeList": [
"ENTERPRISE"
],
"scheme": ["iSage"],
"bundle_short_ver": "3.1.0",
"aws_role_arn": "arn:aws:iam::424114987786:role/mobile-build-uploader-role",
"exportTeamId": {
Expand Down Expand Up @@ -302,6 +317,7 @@
"buildTypeList": [
"ENTERPRISE"
],
"scheme": ["iSage"],
"bundle_short_ver": "3.1.0",
"aws_role_arn": "arn:aws:iam::424114987786:role/mobile-build-uploader-role",
"exportTeamId": {
Expand Down Expand Up @@ -340,6 +356,7 @@
"buildTypeList": [
"ENTERPRISE"
],
"scheme": ["iSage"],
"bundle_short_ver": "3.1.0",
"aws_role_arn": "arn:aws:iam::424114987786:role/mobile-build-uploader-role",
"exportTeamId": {
Expand Down

0 comments on commit af5dcf8

Please sign in to comment.