File tree Expand file tree Collapse file tree 1 file changed +45
-3
lines changed
ansible/tasks/postgres-extensions Expand file tree Collapse file tree 1 file changed +45
-3
lines changed Original file line number Diff line number Diff line change 70
70
args :
71
71
executable : /bin/bash
72
72
73
- - name : plrust - install plrust
74
- ansible.builtin.apt :
75
- deb : " https://github.com/tcdi/plrust/releases/download/v{{ plrust_release }}/plrust-trusted-{{ plrust_release }}_{{ plrust_language_version }}-debian-pg{{ postgresql_major }}-{{ platform }}.deb"
73
+ - name : plrust - install cargo-pgrx and initialize
74
+ shell : |
75
+ source $HOME/.cargo/env
76
+ cargo install cargo-pgrx --locked
77
+ cargo pgrx init --pg{{ postgresql_major }} /usr/bin/pg_config
78
+ args :
79
+ executable : /bin/bash
80
+
81
+ - name : plrust - clone plrust
82
+ git :
83
+ repo : https://github.com/tcdi/plrust
84
+ dest : /tmp/plrust
85
+ version : v{{ plrust_release }}
86
+
87
+
88
+ - name : plrust - move plrustc binary to .cargo/bin
89
+ command :
90
+ cmd : mv "/tmp/plrust/plrust/build/bin/plrustc" "$HOME/.cargo/bin/"
91
+ warn : false
92
+
93
+ - name : plrust - build plrust
94
+ shell : |
95
+ source $HOME/.cargo/env
96
+ export PG_VER="{{ postgresql_major }}"
97
+
98
+ if [[ "{{ platform }}" == "arm64" ]]; then
99
+ STD_TARGETS="aarch64-postgres-linux-gnu"
100
+ elif [[ "{{ platform }}" == "amd64" ]]; then
101
+ STD_TARGETS="amd64-postgres-linux-gnu"
102
+ else
103
+ echo "Unsupported platform : $platform"
104
+ exit 1
105
+ fi
106
+
107
+ ./build
108
+ args :
109
+ executable : /bin/bash
110
+ chdir : " /tmp/plrust/plrust"
111
+
112
+ - name : plrust - install plrust
113
+ shell : |
114
+ source $HOME/.cargo/env
115
+ cargo pgrx install --release --features trusted -c /usr/bin/pg_config
116
+ args :
117
+ executable : /bin/bash
You can’t perform that action at this time.
0 commit comments