Skip to content

Commit ddadcba

Browse files
committed
fix: modtime of release artifact
1 parent 00e77ae commit ddadcba

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: DeterminateSystems/magic-nix-cache-action@v2
1515
- run: nix build
1616
- name: Prepare to upload
17-
run: cp ./result/* sqlnotebook-${{ github.sha }}.vsix
17+
run: cp result sqlnotebook-${{ github.sha }}.vsix
1818
- name: Upload vsix as artifact
1919
uses: actions/upload-artifact@v1
2020
with:

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
1515
- run: nix build
1616
- name: Prepare to upload
17-
run: cp ./result/* sqlnotebook-${{ env.RELEASE_VERSION }}.vsix
17+
run: cp result sqlnotebook-${{ env.RELEASE_VERSION }}.vsix
1818
- name: Upload vsix as artifact
1919
uses: actions/upload-artifact@v1
2020
with:

flake.nix

+13-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,20 @@
5151
'';
5252
nodejs = pkgs.nodejs;
5353
buildCommands = [ "npm run build" ];
54+
buildInputs = with pkgs; [ zip unzip ];
5455
installPhase = ''
55-
mkdir -p $out
56-
cp *.vsix $out/
56+
# vsce errors when modtime of zipped files are > present
57+
new_modtime="0101120000" # MMDDhhmmYY (just needs to be fixed and < present)
58+
mkdir ./tmp
59+
unzip -q ./*.vsix -d ./tmp
60+
61+
for file in $(find ./tmp/ -type f); do
62+
touch -m "$new_modtime" "$file"
63+
touch -t "$new_modtime" "$file"
64+
done
65+
66+
cd ./tmp
67+
zip -q -r $out .
5768
'';
5869
};
5970
};

0 commit comments

Comments
 (0)