Skip to content

Commit fcf9e4a

Browse files
authored
Override iconv version when building it from git (#68)
* Override iconv version when building it from git * Send to signpath only the files that may be signed
1 parent da05321 commit fcf9e4a

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ jobs:
116116
cygwin-mirror: ${{ steps.resolve.outputs.cygwin-mirror }}
117117
cldr-version: ${{ steps.resolve.outputs.cldr-version }}
118118
iconv-version: ${{ steps.resolve.outputs.iconv-version }}
119+
iconv-version-base: ${{ steps.resolve.outputs.iconv-version-base }}
119120
iconv-tarball-from-commit: ${{ steps.resolve.outputs.iconv-tarball-from-commit }}
120121
iconv-source-url: ${{ steps.resolve.outputs.iconv-source-url }}
121122
curl-version: ${{ steps.resolve.outputs.curl-version }}
@@ -204,7 +205,7 @@ jobs:
204205
name: Build tarball
205206
if: needs.versions.outputs.iconv-tarball-from-commit
206207
working-directory: libiconv
207-
run: make dist
208+
run: make dist VERSION=${{ needs.versions.outputs.iconv-version }}
208209
-
209210
name: Upload tarball
210211
if: needs.versions.outputs.iconv-tarball-from-commit
@@ -592,7 +593,9 @@ jobs:
592593
uses: actions/upload-artifact@v6
593594
with:
594595
name: ${{ matrix.link }}-${{ matrix.bits }}-installed-unsigned
595-
path: installed
596+
path: |
597+
installed/**/*.dll
598+
installed/**/*.exe
596599
if-no-files-found: error
597600
retention-days: 1
598601
-
@@ -628,7 +631,7 @@ jobs:
628631
shell: pwsh
629632
working-directory: output-dev
630633
run: |
631-
& 7z.exe a -bd -bt -mx9 -r -sse -tzip ..\assets\gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version }}-${{ matrix.link }}-${{ matrix.bits }}-dev-gcc.zip
634+
& 7z.exe a -bd -bt -mx9 -r -sse -tzip ..\assets\gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version-base }}-${{ matrix.link }}-${{ matrix.bits }}-dev-gcc.zip
632635
-
633636
name: Copy built executables
634637
shell: pwsh
@@ -642,7 +645,7 @@ jobs:
642645
shell: pwsh
643646
working-directory: output-exe
644647
run: |
645-
& 7z.exe a -bd -bt -mx9 -r -sse -tzip ..\assets\gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version }}-${{ matrix.link }}-${{ matrix.bits }}.zip
648+
& 7z.exe a -bd -bt -mx9 -r -sse -tzip ..\assets\gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version-base }}-${{ matrix.link }}-${{ matrix.bits }}.zip
646649
-
647650
name: Prepare build log
648651
id: prepare-build-log
@@ -790,19 +793,19 @@ jobs:
790793
-Link ${{ matrix.link }}
791794
-SourceDirectory output-exe
792795
-OutputDirectory assets
793-
-IconvVersion ${{ needs.versions.outputs.iconv-version }}
796+
-IconvVersion ${{ needs.versions.outputs.iconv-version-base }}
794797
-GettextVersion ${{ needs.versions.outputs.gettext-version }}
795798
-
796799
name: Check bitness
797-
run: ./build-exe/check-bits.sh 32 assets/gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version }}-${{ matrix.link }}-${{ matrix.bits }}.exe
800+
run: ./build-exe/check-bits.sh 32 assets/gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version-base }}-${{ matrix.link }}-${{ matrix.bits }}.exe
798801
-
799802
name: Upload unsigned installer
800803
if: needs.versions.outputs.signpath-signing-policy
801804
id: upload-installer-unsigned
802805
uses: actions/upload-artifact@v6
803806
with:
804807
name: ${{ matrix.link }}-${{ matrix.bits }}-installer-unsigned
805-
path: assets/gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version }}-${{ matrix.link }}-${{ matrix.bits }}.exe
808+
path: assets/gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version-base }}-${{ matrix.link }}-${{ matrix.bits }}.exe
806809
if-no-files-found: error
807810
compression-level: 0
808811
retention-days: 1
@@ -827,7 +830,7 @@ jobs:
827830
run: >
828831
./build-exe/check-signature.ps1
829832
-GettextVersion ${{ needs.versions.outputs.gettext-version }}
830-
-Path assets/gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version }}-${{ matrix.link }}-${{ matrix.bits }}.exe
833+
-Path assets/gettext${{ needs.versions.outputs.gettext-version }}-iconv${{ needs.versions.outputs.iconv-version-base }}-${{ matrix.link }}-${{ matrix.bits }}.exe
831834
-CanBeInvalid ${{ needs.versions.outputs.signatures-canbeinvalid == 'yes' && '$true' || '$false' }}
832835
-
833836
name: Upload assets

build-exe/resolve-versions.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,12 @@ if ($IconvVersion) {
163163
} else {
164164
$IconvVersion = '1.18'
165165
}
166+
$IconvVersionBase = $IconvVersion
166167
$IconvTarballFromCommit = ''
167-
if ((Compare-Versions $IconvVersion '1.18') -eq 0) {
168+
$vo = ConvertTo-VersionObject $IconvVersion
169+
if ((Compare-Versions $vo '1.18') -eq 0) {
168170
$IconvTarballFromCommit = '30fc26493e4c6457000172d49b526be0919e34c6'
171+
$IconvVersion = "$($vo.Major).$($vo.Minor).$($vo.Build).$((Get-Date).ToUniversalTime().ToString("yyyyMMdd"))"
169172
}
170173

171174
if ($GettextVersion) {
@@ -307,6 +310,7 @@ if ((Compare-Versions $GettextVersion '1.0') -ge 0) {
307310
Add-GithubOutput -Name 'cygwin-mirror' -Value $cygwinMirror
308311
Add-GithubOutput -Name 'cldr-version' -Value $CLDRVersion
309312
Add-GithubOutput -Name 'iconv-version' -Value $IconvVersion
313+
Add-GithubOutput -Name 'iconv-version-base' -Value $IconvVersionBase
310314
Add-GithubOutput -Name 'iconv-tarball-from-commit' -Value $IconvTarballFromCommit
311315
Add-GithubOutput -Name 'iconv-source-url' -Value $iconvSourceUrl
312316
Add-GithubOutput -Name 'curl-version' -Value $CurlVersion

0 commit comments

Comments
 (0)