Skip to content

Commit c5e3f9e

Browse files
author
Carlos Cabanero
committed
Added MOSH_TAG for version variable
1 parent e56bf03 commit c5e3f9e

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

.github/workflows/autobuild.yml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
on:
22
workflow_dispatch:
33
name: Auto-Build
4+
env:
5+
MOSH_TAG: 1.4.0
46
jobs:
57
macports-cache:
68
runs-on: macos-12
@@ -52,7 +54,7 @@ jobs:
5254
run: |
5355
docker build -t builder --build-arg TARGET_ARCH=${{ matrix.architecture }} .
5456
55-
- run: git clone --depth=1 --branch mosh-1.4.0 https://github.com/mobile-shell/mosh.git
57+
- run: git clone --depth=1 --branch mosh-$MOSH_TAG https://github.com/mobile-shell/mosh.git
5658

5759
- name: Build binaries for ${{ matrix.architecture }}
5860
run: docker run -v $PWD/mosh:/mosh -w /mosh --name=builder builder sh -c './autogen.sh && LDFLAGS=-static ./configure && make'
@@ -62,19 +64,19 @@ jobs:
6264

6365
- name: Rename binaries
6466
run: |
65-
mv mosh/src/frontend/mosh-server mosh/src/frontend/mosh-server-linux-${{ matrix.architecture }}
66-
mv mosh/src/frontend/mosh-client mosh/src/frontend/mosh-client-linux-${{ matrix.architecture }}
67+
mv mosh/src/frontend/mosh-server mosh/src/frontend/mosh-server-$MOSH_TAG-linux-${{ matrix.architecture }}
68+
mv mosh/src/frontend/mosh-client mosh/src/frontend/mosh-client-$MOSH_TAG-linux-${{ matrix.architecture }}
6769
6870
- uses: actions/upload-artifact@v3
6971
with:
70-
name: mosh-server-linux-${{ matrix.architecture }}
71-
path: mosh/src/frontend/mosh-server-linux-${{ matrix.architecture }}
72+
name: mosh-server-${{ env.MOSH_TAG }}-linux-${{ matrix.architecture }}
73+
path: mosh/src/frontend/mosh-server-${{ env.MOSH_TAG }}-linux-${{ matrix.architecture }}
7274
if-no-files-found: error
7375

7476
- uses: actions/upload-artifact@v3
7577
with:
76-
name: mosh-client-linux-${{ matrix.architecture }}
77-
path: mosh/src/frontend/mosh-client-linux-${{ matrix.architecture }}
78+
name: mosh-client-${{ env.MOSH_TAG }}-linux-${{ matrix.architecture }}
79+
path: mosh/src/frontend/mosh-client-${{ env.MOSH_TAG }}-linux-${{ matrix.architecture }}
7880
if-no-files-found: error
7981

8082
macos-build:
@@ -105,35 +107,35 @@ jobs:
105107
${{ runner.os }}-build-
106108
${{ runner.os }}-
107109
108-
- run: git clone --depth=1 --branch mosh-1.4.0 https://github.com/mobile-shell/mosh.git
110+
- run: git clone --depth=1 --branch mosh-$MOSH_TAG https://github.com/mobile-shell/mosh.git
109111

110112
- run: PATH=/opt/local/bin:$PATH ./autogen.sh
111113
working-directory: ./mosh
112114

113115
- run: |
114116
chmod +x build.sh
115-
env ZERO_AR_DATE=1 MACOSX_DEPLOYMENT_TARGET=11.0 PATH=/opt/local/bin:$PATH ./build.sh
117+
env MOSH_TAG=$MOSH_TAG ZERO_AR_DATE=1 MACOSX_DEPLOYMENT_TARGET=11.0 PATH=/opt/local/bin:$PATH ./build.sh
116118
working-directory: ./macOS
117119
118120
- uses: actions/upload-artifact@v3
119121
with:
120-
name: mosh-client-darwin-x86_64
121-
path: ./macOS/prefix_x86_64/local/bin/mosh-client-darwin-x86_64
122+
name: mosh-client-${{ env.MOSH_TAG }}-darwin-x86_64
123+
path: ./macOS/prefix_x86_64/local/bin/mosh-client-${{ env.MOSH_TAG }}-darwin-x86_64
122124

123125
- uses: actions/upload-artifact@v3
124126
with:
125-
name: mosh-server-darwin-x86_64
126-
path: ./macOS/prefix_x86_64/local/bin/mosh-server-darwin-x86_64
127+
name: mosh-server-${{ env.MOSH_TAG }}-darwin-x86_64
128+
path: ./macOS/prefix_x86_64/local/bin/mosh-server-${{ env.MOSH_TAG }}-darwin-x86_64
127129

128130
- uses: actions/upload-artifact@v3
129131
with:
130-
name: mosh-client-darwin-arm64
131-
path: ./macOS/prefix_arm64/local/bin/mosh-client-darwin-arm64
132+
name: mosh-client-${{ env.MOSH_TAG }}-darwin-arm64
133+
path: ./macOS/prefix_arm64/local/bin/mosh-client-${{ env.MOSH_TAG }}-darwin-arm64
132134

133135
- uses: actions/upload-artifact@v3
134136
with:
135-
name: mosh-server-darwin-arm64
136-
path: ./macOS/prefix_arm64/local/bin/mosh-server-darwin-arm64
137+
name: mosh-server-${{ env.MOSH_TAG }}-darwin-arm64
138+
path: ./macOS/prefix_arm64/local/bin/mosh-server-${{ env.MOSH_TAG }}-darwin-arm64
137139

138140

139141

@@ -157,7 +159,7 @@ jobs:
157159
echo '### Linux'
158160
echo '```'
159161
(
160-
for dir in mosh-client-linux* mosh-server-linux*; do
162+
for dir in mosh-client-$MOSH_TAG-linux* mosh-server-$MOSH_TAG-linux*; do
161163
cd "$dir"
162164
for prog in mosh*; do
163165
file "$prog"
@@ -170,7 +172,7 @@ jobs:
170172
echo '### macOS'
171173
echo '```'
172174
(
173-
for dir in mosh-client-darwin* mosh-server-darwin*; do
175+
for dir in mosh-client-$MOSH_TAG-darwin* mosh-server-$MOSH_TAG-darwin*; do
174176
cd "$dir"
175177
for prog in mosh*; do
176178
file "$prog"

macOS/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ for triple in $ARCH_TRIPLES; do
4646
make install -j8 V=1 &&
4747
rm -f "${prefix}/etc"
4848
then
49-
mv "${prefix}/local/bin/mosh-client" "${prefix}/local/bin/mosh-client-darwin-${arch}"
50-
mv "${prefix}/local/bin/mosh-server" "${prefix}/local/bin/mosh-server-darwin-${arch}"
49+
mv "${prefix}/local/bin/mosh-client" "${prefix}/local/bin/mosh-client-${MOSH_TAG}-darwin-${arch}"
50+
mv "${prefix}/local/bin/mosh-server" "${prefix}/local/bin/mosh-server-${MOSH_TAG}-darwin-${arch}"
5151
5252
BUILT_ARCHS="$BUILT_ARCHS $arch"
5353
fi

0 commit comments

Comments
 (0)